My script is as follows:
#!/bin/sh
rm -rfv /home/user/Documents/Exercise/*
cp -rfv /home/user/Documents/ExerciseShare/ExerciseFiles/Word/Advanced/ /home/tp3/Documents/Exercise/
If i was to run these commands individually via Terminal they run ok. I have put them in a script (as above) and when I attempt to tun the script the Terminal windows flashes for about a second and nothing happens.
My attempts at solutions:
- Adding
waitto the end of the script - no luck - Right Click Script > Properties > Permissions > Execute - set
- Attempted to
RunandRun in Terminal- no luck
I am using Ubuntu 12.10 64-bit
./script, replacingscriptwith the name of your script. (If that works, then it's especially important for you to explain precisely how you're running the script when it doesn't work.) – Eliah Kagan Mar 20 '13 at 11:21/home/user/Desktop/copyword.shbash: /home/user/Desktop/copyword.sh: /bin/sh^M: bad interpreter: No such file or directory– Mitchell Mar 20 '13 at 20:49