The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Linux Shell Question: how to print the shell script name ? meili100 UNIX for Dummies Questions & Answers 3 07-01-2008 10:55 AM
Difference between writing Unix Shell script and AIX Shell Scripts haroonec AIX 0 04-11-2006 11:27 PM
How to run unix commands in a new shell inside a shell script? hkapil Shell Programming and Scripting 2 01-04-2006 03:56 AM
how to convert from korn shell to normal shell with this code? forevercalz Shell Programming and Scripting 21 11-22-2005 11:18 PM
simple shell - how to get a parameter typed in a shell script cmitulescu Shell Programming and Scripting 3 12-05-2001 12:04 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-16-2004
Registered User
 

Join Date: Oct 2003
Location: Pratt,KS
Posts: 78
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.

Thanks
Reply With Quote
Forum Sponsor
  #2  
Old 03-16-2004
Moderator
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,477
Just make sure the first line of your shell script has a line that points to your shell, like

#!/bin/bash

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.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:45 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0