[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need some shell scripting help

> while read item
> do
> echo "${item}"
> done <$(ls)

for item in $(ls); do
	echo "${item}"

I'd go with $(find . -maxdepth 1) or something, instead of ls. You
could even play with find . -maxdepth 1 -exec echo {} \;, or find
. -maxdepth 1 | xargs echo

Attachment: pgp4HymPxkBv3.pgp
Description: PGP signature

Reply to: