[ale] first time shell script

Christopher Fowler cfowler at outpostsentinel.com
Tue May 6 17:45:27 EDT 2003


Maybe you want to go to the MAC OS X list.  But, this
group is good for general UNIX questions.

$ chmod u+x <script name>
$ ./<script name>

It should run fine.

A sample script:

--- Cut Here ---
#!/bin/sh

echo "Hello, World!"
--- Cut Here ---

--- Cut Here ---
#!/usr/bin/python

print  "Hello, World!\n";
--- Cut Here ---


--- Cut Here ---
#!/usr/bin/perl

use strict;
my $MSG = "Hello, World!\n";
print $MSG;
--- Cut Here ---

--- Cut Here ---
#!/usr/bin/tclsh

puts "Hello, World!";
--- Cut Here ---


Thos are just a few of the scripts one can do.  I'm sure others
have plenty more examples.






On Tue, May 06, 2003 at 04:12:16PM -0400, dino wrote:
> I have been doing some reading about shell scripts and have some 
> questions.  I am using the BASH shell on Mac's OSX.
> 
> Most sample scripts say to change the file to an executable via "chmod 
> u+x scriptname"
> After doing this i should be able to simply type in "scriptname" and it 
> should run.
> 
> I cant seem to get this to work, I must enter it like this
> "bash scriptname"
> 
> is this normal or am I not doing something correct?
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list