i am having a weird error on mac os x running some shell scripts. i am a complete newbie at this and this question concerns 2 scripts. one of which a friend of mine wrote (videochecker.sh) a couple weeks ago and it's been running fine on another machine.
then last week i wrote capture.sh and it has been running fine on a couple computers.
but then i tried to run videochecker.sh on a new machine that runs capture.sh fine and i got the following error:
: No such file or directory#!/bin/bash
why will one script(capture.sh) execute fine and the other (videochecker.sh) gives this weird bash error?
but then i saw they had different first lines.
one is /bin/sh and one is /bin/bash
weird thing to because the one that doesn't work on this machine (/bin/bash) has been working fine on the other broadcaster mac min for several weeks. scripts still very mysterious to me.
so i change it so #!/bin/sh and #! /bin/sh still no go...
: No such file or directory#!/bin/sh
: command not foundline 2:
: command not foundline 5:
: command not foundline 7:
: command not foundline 9:
'/videochecker.sh: line 72: syntax error near unexpected token `do
'/videochecker.sh: line 72: `for f in *.mp4; do
another thing i tried as suggested:
bash -ex ./videochecker.sh
' '#!/bin/sh
: No such file or directory#!/bin/sh
Clarence$ bash -ex ./videochecker.sh
' '#!/bin/bash
: No such file or directory#!/bin/bash
Clarence$ echo $SHELL
/bin/bash
two screenshots of terminal and some other discussion of the error
weird bash not found error in mac terminal on Flickr - Photo Sharing!
scripting error, #!/bin/bash not found? on Flickr - Photo Sharing!
anybody have any ideas here? sorry if i posted in wrong place. wasn't sure if this was a scripting problem or a mac os x problem.
thanks,
dan