why this simple bash script doesn't run on my G5 OS X Tiger?




Hi, All,

This is my first try to use shell scripts on Mac. And I can't figure out
why this simple script doesn't run.

$> vi testscript.sh
#!/bin/bash
echo "Hello Test"

$> ls -l
-rwxr-xr-x 1 kr kr 28 May 30 00:41 testscript.sh

$> testscript.sh
-bash: run: command not found

So, what am I missing here. I checked "Excute this
command..." as "/bin/bash", but it should run anyway according to the
guide on the Mac web site.

The command line,
$>echo "Hello"
works fine though.

Thanks in advance,

KR


.



Relevant Pages

  • Re: why this simple bash script doesnt run on my G5 OS X Tiger?
    ... Key-Rok Choi wrote: ... This is my first try to use shell scripts on Mac. ... -bash: run: command not found ...
    (comp.sys.mac.system)
  • Re: HAL (again) and commandline control?
    ... instead of echo "`ls /media`" that echo is entirely superfluous ... when developing shell scripts that, for whatever grotty, aka ... True, but if that had been intended, the command would have been: ... The intent of "`ls /media`" is to capture the name of anything mounted ...
    (alt.os.linux)
  • Re: HAL (again) and commandline control?
    ... What's the point of 'echo'? ... when developing shell scripts that, for whatever grotty, aka ... dangerous, bits the script may intend to do, you should substitute ... True, but if that had been intended, the command would have been: ...
    (alt.os.linux)
  • unix shell script help (KSH on AIX)
    ... I'm no good at writing shell scripts. ... echo Hostname:>> file.txt ... echo Processors:>> file.txt ... Try to run a command ...
    (comp.unix.shell)
  • Re: Newbie (Mac Addict) interesed in SGI.?.?
    ... < major snip of coder/advanced-advanced commandline junk> ... Is a genuine "Mac-like point/clik GUI" W/O need for COMMAND LINE entry?? ... Any person with half a brain --can immediately start working a Mac ... Also want to know if the SCSI drives on the SGI's are 50-pin regular ...
    (comp.sys.sgi.misc)