[Solved] How do I remove all lines starting from the beginning until I reach a certain pattern, except from the last one [closed]

The way to do this is by using awk as you already suggested. As you say, you want to print the lines starting from the first occurrence where you have 3 fields, this can easily be done by setting a print flag (let’s call it p)’ awk ‘(NF==3){p=1};p’ file This will print everything starting from … Read more