Below is my input file, input.txt
:
Value Value1 value2
5 1 2
1 4 3
2 1 5.5
0 0 0
4 1 0
I need to search the value(5.5) in the 3rd column, if found i need to remove the row entirely.
And i need the output like below, output.txt
:
Value Value1 value2
5 1 2
1 4 3
0 0 0
4 1 0
i have tried awk command to remove the row, but I'm stuck with the below part(???). Don't to how to remove the row entire row from awk command. please suggest way to achieve this. Thanks! awk -F"\t" '{if($3==5.5) ??? }'
If you want exclude all lines with 3rd column's value 5.5
then:
awk '$3!=5.5' filename
GNU safer sed
sed -r '/\s*(\S+\s+){2}5.5/d' file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With