how to suppress some of ls's output?
if you do:
ls /usr /opt it will display the output of each /usr and /opt, but it precedes each with "/usr:" and "/opt:" Those entries foul up scripts that use something like "foreach f (`ls /usr /opt`)" Is there a way to suppress the output of "/usr:" and "/opt:"? Thanks |
I couldn't find anything in the ls man page to do this. Do either of the following help?
Code:
ls /opt /usr | sed -e '/:/d' -e '/^$/d' |
Quote:
still if there's a way to do it with just plain ol' ls, I'd be interested to know. |
All times are GMT -5. The time now is 02:40 PM. |