linux - Can't run a script -


i tried create script in linux, on synology server on ssh

so wrote file test.sh

#!/bin/bash echo "this test" 

i saved file. after did

chmod 755 test.sh 

the did

./test.sh 

then got error

-ash "./test.sh" not found 

the file created in

/root 

i don't understand

your shell (ash?) trying execute script , getting enoent (no such file or directory) error code back. can refer script itself, in case refers interpreter named in #! line.

that is, /bin/bash not exist , that's why script couldn't started.

workaround: install bash or (if don't need bash specific features) change first line #!/bin/sh.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -