Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • awk 'BEGIN{FS=OFS="\t"} f{ $5="B"} $1=="TER"{ f=1 } 1' file this added a B at the end of the file , but the POSIX worked really well, appreciated Commented Apr 17 at 17:39
  • @PaoloLorenzini if that script added a B to the end of the output file then you have a blank line at the end of your input file. I just tweaked the awk script to not modify such lines but you should edit your question to mention there could be blank lines in the input that you want to leave as-is. Commented Apr 17 at 17:41