I have a simple - yet trivial problem -
I 2000 directory at /home2/foo/foodir/ .
I need to copy all files with extension *.atm and *.ali to another directory
called temp (say /home2/foo/foodir/temp )
After that I need to run a program in each of this directory - (say joy
*.ali )
If am suppose to do it it will take a hell lot of time - so I have written a
small perl
script - but am not able to get what i need ...
Here is my script :
@a=`cat list`;
foreach $a(@a)
{
`mkdir $a`;
# it is working fine up to this end -
`cd $a`;
`cp ../../$a/ *.ali .`;
`cp ../../$a/ *.atm .`;
}
am getting error / warning like this
cp: missing destination file
Try `cp --help' for more information.
sh: /: is a directory
but when am doing it manualy all the comments are working fine
Please help me with some inputs -
--
ikid