script file extension/syntax

Michael Wahlbrink mimi.ka at gmx.de
Wed Oct 23 08:22:20 PDT 2002


Hi eric,
Eric Miller wrote:
[...]
> 
> What is the file extension for bash scripts, and can I just change the file
> extension on a .txt file to that and have it work properly?  Also, what is
> the correct path to drop the script in to have it work from the command
> line, I think its /bin or /sbin.  Does executing a script in linux require a
> special syntax (like @<scriptname>) or do I just type the filename if its in
> the right path?
> 
> Thanks!
> 
under Linux/*nix 'Shell'scripts are normal textfiles, they do not depend 
on a extension. They should be  set executable and in the first row they 
must have a line starting with "#!" and the interpreter (like 
"#!/bin/sh" for a script using sh as shell). To execute the script you 
had to call it with the complete path or with a relative path like "./" 
for the current directory.....

hth
micha

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message



More information about the lfs-support mailing list