PDA

View Full Version : [VU+ Duo] Issue using scripts



fiberc0ax
30-08-13, 23:06
Hi,

I want to setup some of my own scripts.

I have latest openvix image on a Vu+ Duo.

If i try to run any bash style scripts i always get the below error, i even tried on hello world.
root@vuduo:/usr/script# ./hello.sh
-sh: ./hello.sh: not found

correct permissions are set, the script im trying is.

#!/bin/bash
echo hello world

Also tried

#!/bin/sh
echo hello world

and this did not work either, has anyone got any ideas?

Thanks

LraiZer
30-08-13, 23:34
check spelling of file is cAsE SenSitiVe correct, and file IS actually in that folder with correct permissions?

ls -l /usr/script
root@dm800se:~# ls -l /usr/script
-rwxr-xr-x 1 root root 162 Aug 30 2013 hello.sh

fiberc0ax
31-08-13, 07:00
Hi,

already checked that and all is correct.

it seems to do the same error with any #! based script that I try.

Trial
31-08-13, 09:24
Hi,
did you use an editor that uses linux style line endings? Notpad will NOT work.

ciao

fiberc0ax
31-08-13, 12:56
Hi i did it in vi

i did which bash and it shows /bin/bash so why on earth wont it work? :-(

Trial
31-08-13, 18:56
Hi,
perhaps no real bash? Try
#!/bin/sh

ciao

fiberc0ax
01-09-13, 12:44
Hi,

sorry all this was my fault.

i had some dodgy encoding in my file.

all workimg now but wget seems to have gone :-(
this is the second time its happened i just reinstalled the whole image last time.