Thanks a lot all for your help. It worked perfectly with krishmath and vidyadhar85's suggestions...
Just Ice, thanks to you also, but as I have "-" in 3rd Gene symbol col also sometimes, thus I prefer to use column number.
Thanks a lot to all again.
---------- Post updated at 07:38 AM ---------- Previous update was at 07:20 AM ----------
Hello all,
Can anybody suggest me why the new file sizes created by all above commands differ? only first two are identical with awk...
awk '{if ($2!="-") print}' file.txt
or
awk '$2!="-" {print} ' file.txt
But with
awk '$2 ~ !/-/{print $0}' filename
and
grep -v "\-" file
provide different file size... I am comparing as my input file is same, and for this occasion I have no '-' in other cols.
thanks krishmaths,
yes I did that. But what I ment to say is, I don't have "-" in any other col for the first file. but in another I had. Thus I realized that must be the problem while other codes stopped.
Thus I preferred specifying col no.
Thanks,
Mitra