david <[EMAIL PROTECTED]> writes:

> #!/bin/bash
> cd /home/david/test
> for x in $(ls)
> do
>         y=$(echo "$x" | cut -c -3)
>         for z in $(ls "$x")
>         do
>                 mv "$x"/"$z" "$x"/$y"$z"
>         done
> done
>
> but this is what i get:

try 

for a in * ; do echo "$a"; done

or if you're worried about there being too many files

ls | while read a ; do echo "$a"; done


-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to