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



Key-Rok Choi wrote:
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.


Does ./testscript.sh work? I.e., is . in your path?


Greg

--
"All my time I spent in heaven
Revelries of dance and wine
Waking to the sound of laughter
Up I'd rise and kiss the sky" - The Mekons
.



Relevant Pages

  • why this simple bash script doesnt run on my G5 OS X Tiger?
    ... This is my first try to use shell scripts on Mac. ... echo "Hello Test" ... -bash: run: command not found ...
    (comp.sys.mac.system)
  • 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)
  • Re: Mounting a problem hard drive
    ... unless I am missing some command in this program. ... was using the hard drive with my Mac Mini-Intel computer with EyeTV ... Once these sections were edited out of the recording, ... In my OS X books I note a mention of the MOUNT command ...
    (comp.sys.mac.system)
  • Re: Open .html file from java application? How?
    ... we support for Windows 2000 and higher as well as any Linux that is ... As a Mac supporter, I do some occasional testing on my PowerBook ... This allows me to let the user indicate what command to use ... Steve W. Jackson ...
    (comp.lang.java.programmer)
  • Re: Evolutionary Humour
    ... Remember, Windows was designed for lusers, not users. ... in Windows is ipconfig and pinging my Linux machine to see if iptables ... AFAIK you have to run a DOS command to find out how your netwanking is ... You can find the MAC address ...
    (talk.origins)