Sample Header Ad - 728x90

Can i skip a pattern and also print that pattern along with line by line file comparison using awk?

0 votes
1 answer
62 views
I have the code below (please see https://unix.stackexchange.com/questions/392722/need-to-understand-below-awk-command-to-find-missing-lines-in-a-file/744316?noredirect=1#comment1415306_744316) : awk 'NR==FNR{a[$0];next}(!($0 in a)){print}' 1.txt 2.txt Can I add one more condition to skip the comparison of lines if the line starts with = (i.e '$0 ~ /^=/ {print $0}') and just print those lines alone as it is?
Asked by dbadmin (23 rep)
Apr 28, 2023, 08:40 AM
Last activity: Apr 28, 2023, 10:20 AM