shell - Grep command Linux ordering of source string and target string -
grep command syntax as:
grep "literal_string" filename --> search string in filename. so assuming order of
-- keyword(grep) --> string searched --> filename/source string , command interpreted left right. my question how commands such got processed:
ps -ef | grep rman do order optional?
how grep able know source on left , not on right? or missing here.
when using unix pipes, system commands take output previous command (to left of pipe ) , pass output onto command right of pipe.
the order important when using grep or without pipe.
thus
grep doberman /file/about/dogs is same as
cat /file/about/dogs | grep doberman see pipes on http://linuxcommand.org/lts0060.php more information.
Comments
Post a Comment