[svlug] Setting a files properties

hvrietsc@yahoo.com hvrietsc at yahoo.com
Mon Jan 7 21:29:02 PST 2002


assuming you mean a shell script then:

first line of the script should be:
#/bin/sh

(yes a # comment in front!)

then to make the script executable use:

chmod a+rx filename-of-script

it is best if you keep all your scripts in a dir say $HOME/bin
and then add this to your PATH variable by using:

PATH=$PATH:$HOME/bin

(you can add this line to the $HOME/.bashrc)

then you can even execute the script by just typing "filename"
so without the ./ in front

On Mon, Jan 07, 2002 at 11:37:20AM -0800, Todd G. Gardner wrote:
> Hello,
> 
> How do I make a script file execute when typing "./filename"?
> 
> Can I use chmod to do this or is there a better way?
> 
> Thank you,
> 
> Todd
> 
> 
> 
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/svlug




More information about the svlug mailing list