Jul 26, 2010 #1 RTB2805 Programmer Jul 26, 2010 2 GB I have a file with two columns, I need to delete any lines where $2 id black should such lines exist. Any assistance appreciated.
I have a file with two columns, I need to delete any lines where $2 id black should such lines exist. Any assistance appreciated.
Jul 26, 2010 #2 PHV MIS Nov 8, 2002 53,708 FR where $2 id black What do you mean ? Something like this ? Code: awk '$2!="black"' /path/to/input >output Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
where $2 id black What do you mean ? Something like this ? Code: awk '$2!="black"' /path/to/input >output Hope This Helps, PH. FAQ219-2884 FAQ181-2886
Jul 26, 2010 Thread starter #3 RTB2805 Programmer Jul 26, 2010 2 GB Sorry, I'm having an attack of dystypia! That should read is blank; ie $2="" Rob Upvote 0 Downvote
Jul 26, 2010 #4 PHV MIS Nov 8, 2002 53,708 FR So, even simpler: Code: awk '$2' /path/to/input >output Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote