shell ?? | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    

UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

shell ??

UNIX for Dummies Questions & Answers

Closed Thread    
Thread Tools Search this Thread Display Modes
Old 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 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 9 Times in 8 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
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 03:58 AM
calling 'n' number of shell scripts based on dependency in one shell script. shashi369 Shell Programming and Scripting 1 11-03-2009 05: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 07:52 AM
How to Start a Shell as Login shell instead of ordinary shell Sivaswami Linux 3 07-01-2008 02:52 PM
Difference between writing Unix Shell script and AIX Shell Scripts haroonec AIX 0 04-12-2006 03:27 AM

All times are GMT -4. The time now is 12:12 PM.