Hi all!
I am having some issues with a script, this is my first foray into Ubuntu and have read many guides, tutorials etc, so please be gentle!
My script (copyword.sh) is as follows:
Code:
#!/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 (opens as if it is about to do something and then closes) for about a second and nothing happens.
My attempts at solutions:
1. Adding `wait` to the end of the script - no luck
2. Right Click Script > Properties > Permissions > Execute - set
3. Attempted to `Run` and `Run in Terminal` - no luck
When I attempt to run the script via terminal as below I get an error:
Code:
/home/user/Desktop/copyword.sh
Error:
Code:
bash: /home/user/Desktop/copyword.sh: /bin/sh^M: bad interpreter: No such file or directory
Any help would be much appreciated!
Cheers,
Mitchell
Bookmarks