[prog] Grep

anshika kalra kalra.anshika at gmail.com
Mon May 19 14:03:33 UTC 2008


Hi,

I was trying to get the name of file from directory using grep.
grep  <filename> <directory name>
But no result was displayed.Since linux treats directories also as files
then why is this happening?

Could someone also tell why
grep '<word1>' '<word2>'   <filename>  displays an error.I only know that
placing these words in a file and then using fgrep or grep -f gives result.
Is there any other way.


More information about the Programming mailing list