The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: Script help
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 08-29-2008
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,380
Quote:
Originally Posted by kumars View Post
Hi there to everyone,

I am new to shell script and I am in the need to develop and run scripts on the AIX. I am using 'ksh' on AIX .

Could anyone please tell me what should be file extension for the script on 'ksh' and how to compile it.

I mean the script ext. should be...

filename.ksh or filename.csh, etc,......

There is no need for any file extension or suffix (on *nix, they are not really extensions).

I use a suffix of "-sh" for the development versions of my scripts. When they are ready to use, I copy them to the production directory (usually /usr/local/bin) without the suffix. That way, I can play around with the develoopment copy while keeps a pristine production version. (I have scripts for this in the last chapter of my book, Shell Scripting Recipes.)
Quote:

and how to compile it.

You do not compile shell scripts. All you need to do is set the execute permissions:


Code:
chmod +x /path/to/script