Skip to main content

Thread: Running commands from a script do not work


hi all!

having issues script, first foray ubuntu , have read many guides, tutorials etc, please gentle!

script (copyword.sh) follows:


code:
#!/bin/sh rm -rfv /home/user/documents/exercise/* cp -rfv /home/user/documents/exerciseshare/exercisefiles/word/advanced/ /home/tp3/documents/exercise/
if run these commands individually via terminal run ok. have put them in script (as above) , when attempt tun script terminal windows flashes (opens if , closes) second , nothing happens.


attempts @ solutions:


1. adding `wait` end of script - no luck
2. right click script > properties > permissions > execute - set
3. attempted `run` , `run in terminal` - no luck

when attempt run script via terminal below 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 appreciated!

cheers,
mitchell

try putting full stop in front i.e.

./home/user/desktop/copyword.sh

or if in folder

./copyword.sh


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu [ubuntu] Running commands from a script do not work


Ubuntu

Comments

Popular posts from this blog

Some mp4 files not displaying correctly (CS6)

Thread: Samba is not authenticating with LDAP