I am look to script a bash script that will loop through a directory go into sub directory and move files that are say .fileb to a new directory
it has to work like this
Code:
start/dira/1.filea
start/dira/1.fileb
start/dira/2.filea
start/dira/2.fileb
start/dirb/1.filea
start/dirb/1.fileb
start/dirb/2.filea
start/dirb/2.fileb
//run script
start/dira/1.filea
start/dira/2.filea
start/dirb/1.filea
start/dirb/2.filea
end/dira/1.fileb
end/dira/2.fileb
end/dirb/1.fileb
end/dirb/2.fileb
i tried mv start/*/*.fileb end/*/
but that tried to put all the files in
end/dira/
how can i do this?
Scott.