Linux.com

TannusCorwin

TannusCorwin

  • Linux.com Member
  • Posts: 1
  • Member Since: 14 May 09
  • Last Logged In: 18 Mar 10

Latest Posts

Posted by
Topic
Post Preview
Posted
  • TannusCorwin
    RE: communication of grep
    If you are wondering what it can use for input, you can redirect stdin to it, (Which you are basically doing, when you use the | in your command). Or you can specifiy a file to read. It outputs to stdout. If you need to output to a file, you can always redirect the output with > or >> if nessecary. So grep /etc/passwd >> results.txt - would search the passwd file for all instances of and would create the txt file with the results. Is this what you are looking for?
    Link to this post 04 Aug 09

    If you are wondering what it can use for input, you can redirect stdin to it, (Which you are basically doing, when you use the | in your command). Or you can specifiy a file to read. It outputs to stdout. If you need to output to a file, you can always redirect the output with > or >> if nessecary.

    So grep <username> /etc/passwd >> results.txt - would search the passwd file for all instances of <username> and would create the txt file with the results.

    Is this what you are looking for?

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board