hi , could you help me with shell scripting
in a shell script i have these commands
a=`ls -R $dir | grep ./ `
cp -R ./$a/* ./$output/
with the first command i have all the directories with the second command i want to copy them in a new directory something like this
old/old/insomnia/1.mp3
old/old/linux/insomnia/sd/2.avi
old/old/linux/insomnia/sd/3.avi
and the new directory tha the script will create is
new/insomnia/1.mp3
new/sd/2.avi
new/sd/3.avi
thanks in advance !!!