Unix/Linux Go Back    

UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

shell ??

UNIX for Dummies Questions & Answers

Thread Tools Search this Thread Display Modes
Old Unix and Linux 03-16-2004
rocker40 rocker40 is offline
Registered User
Join Date: Oct 2003
Last Activity: 3 February 2009, 7:34 PM EST
Location: Pratt,KS
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
shell ??

I have AIX 5.1
How do I tell what shell is being used?
I read alot about the shell and scrpiting but have not come across how to tell what shell is being used. I would like to make some scripts to run with a command called weekly.backup
but I not sure how to tell what shell the others are written in.
I have read that I should write all the commands in the same shell??
I have even gotten some ideas from some of the old posts here on what to do for different shells.

Sponsored Links
Old Unix and Linux 03-16-2004
cbkihong cbkihong is offline Forum Advisor  
Join Date: Sep 2002
Last Activity: 4 May 2014, 6:22 AM EDT
Location: Hong Kong, China
Posts: 1,622
Thanks: 0
Thanked 11 Times in 10 Posts
Just make sure the first line of your shell script has a line that points to your shell, like


Then your script will be executed by that shell. You can use any shell that is available on your system.

You can try to type

echo $SHELL

or, more accurately,

echo $0

in the terminal to find out the shell you are running.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need help with a shell script:Config Transparent Proxy using Shell kaka287 Shell Programming and Scripting 0 01-10-2010 02:58 AM
calling 'n' number of shell scripts based on dependency in one shell script. shashi369 Shell Programming and Scripting 1 11-03-2009 04:31 PM
Help need to make a shell script run for ffmpeg vhook watermaking in shell wingchun22 Shell Programming and Scripting 1 09-27-2008 06:52 AM
How to Start a Shell as Login shell instead of ordinary shell Sivaswami Linux 3 07-01-2008 01:52 PM
Difference between writing Unix Shell script and AIX Shell Scripts haroonec AIX 0 04-12-2006 02:27 AM

All times are GMT -4. The time now is 03:33 AM.