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

Stupid shell question



Hi Shellsters,

 I've got a directory structure like this:

./project1/bak/a.yml
./project1/bak/b.yml
./project2/bak/c.yml
./project2/bak/d.yml

I want to move the *.yml files into the corresponding parent directory.

I tried this:

for dir in `find -maxdepth 1 -type d`; do chdir $dir/bak; mv *.yml .. ; chdir ../..; done

But get an error:

mv: can't stat *.yml

Thanks for any help.

-- 
Joel Roth


Reply to: