Hey,
Need some help for command to print only lines with two columns in a file
abc 111
cde 222
fgh
ijk 2
klm 12 23
nop
want the ouput to be
abc 111
cde 222
ijk 2
Thanks a lot in advance!!!
Hey,
Need some help for command to print only lines with two columns in a file
abc 111
cde 222
fgh
ijk 2
klm 12 23
nop
want the ouput to be
abc 111
cde 222
ijk 2
Thanks a lot in advance!!!
awk ' NF==2 {print $0} ' myfile > newfile
grep '^[^ ]* [^ ]*$' INPUTFILE
grep ' ' INPUTFILE | grep -v ' .* '
perl -ne 's/ / /g == 1 and print' INPUTFILE
Thanks guys!!!