[clue-tech] Bash script question

David Guntner davidg at akamail.com
Wed Sep 14 20:03:03 MDT 2005


Angelo Bertolli grabbed a keyboard and wrote:
> I have a shell script that does something like this:
>
> for file in `ls`
> do
>
> However, I would rather be able to pipe a list of items into the script,
> instead of relying always on ls:
>
> ls | myscript
>
> Is this possible?

Just doing this off the top of my head, but I think that

ls | xargs myscript

would do what you want there.

             --Dave
_______________________________________________
CLUE-tech mailing list
CLUE-tech at cluedenver.org
http://cluedenver.org/mailman/listinfo/clue-tech



More information about the clue-tech mailing list