Identify non-coding regions from a genome annotation
Getting the non coding regions of a protein coding transcript, sounds like you are looking for UTR.
UTR has its own feature in the gtf file. So you can do this:
$ awk -v FS="\t" '$3==&quot;UTR&quot;' gencode.gtf

If the gtf file is compressed use this instead:
$ zcat gencode.gtf.gz | awk -v FS="\t" '$3==&quot;UTR&quot;'

BTW: Why are you using such an old release of gencode? The current version is v29.
As @Wouter tells you, the non coding region of a genome is the complement of the coding regions. Coding regions have its own feature in the gtf file. You can get them with $ awk -v FS=&quot;\t&quot; '$3==&quot;CDS&quot;' gencode.gtf. Reading the manual for bedtools complement is your task.