Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Programming in Linux _ Noob needs help with script

Posted by: Yaesu Apr 25 2013, 09:21 PM

I need to create a script that will check to see if a file exists and if it does then make 10 copies of itself with an appended name in another directory. This is what I have but its not working. I got the error message to work but I cant even get it to make one copy of itself. if i use a known file it still gives me an error message that I created. Can someone check this out for me.


if [ $1 -e ]
         while [$N -le 10 ]
         cp $1 $2
         echo File does not exist.

Posted by: michaelk Apr 27 2013, 08:56 AM

I assume this is homework. Have you tried searching the web for help with bash programming?


Powered by Invision Power Board (
© Invision Power Services (