how to grep the pattern ?
How can I grep or find the pattern from this files in the directory. I have couple of ascii files too.I have to grep the binary files.Please assist me
Thanks
Francis
how to grep the pattern ?
How can I grep or find the pattern from this files in the directory. I have couple of ascii files too.I have to grep the binary files.Please assist me
Thanks
Francis
Regular grep does not cope well with control characters. Those look like basically text files anyway, except they have DOS line endings; you can convert them to Unix line endings with unix2dos or a similar utility.
grep is inherently line-oriented; if the input is not "lines", it's not clear what it should print even if it finds a match.
To find files containing ctrl-M, try something like
perl -ne 'if (m/\r/) { print "$ARGV\n"; close ARGV }' *
Thanks....its working now