0

I'm looking for a way that allows me to show the entire lines of a file or output where the last column is not "A".

I am aware that I can use awk '{print $(NF)}' and then use a negative grep to exclude the rows that have A in the last column, but that would only show me the last column value while I need the entire lines.

Any suggestions?

Porcac1x
  • 105
  • 9
  • May I just say that the duplicated thread that my question has been linked to is absolutely not the same to the topic discussed here? My question is specific to the last column of the file and this matter is not discussed in the other thread. You guys are definitely too quick on closing threads. Luckily I got the right answer before you could do that – Porcac1x Sep 02 '22 at 08:48

1 Answers1

2

Just check the last column in awk:

awk '$NF != "A"
KamilCuk
  • 120,984
  • 8
  • 59
  • 111