|
Piping syntax question
There are are lots of examples of piping output FROM the 'ls' command TO another command, but how does one pipe output TO the 'ls -l' command?
For example, use 'which' to find a file, then use 'ls -l' to view the permissions, groups, etc. in a single step:
which <filename> | ls -l
returns a long listing of the current directory, not a long listing of the filename and path returned by the 'which' command.
which <filename> | ls -l -
returns a file not found error on '-'
Suggestions, please. Thanks!
John
|