LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-07-2014, 05:19 AM   #1
maitree@123
LQ Newbie
 
Registered: Sep 2013
Posts: 7

Rep: Reputation: Disabled
checking the status of last executed command in AIX


What is the command foe checking the status of last executed command in AIX ?
In Unix we have $? but AIX what is command.
 
Old 02-07-2014, 11:58 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Doesn't that depend on the shell which you're running? BASH and KORN are $?, C Shell is something like the variable status; I just don't know C Shell well enough to know how to call out a variable, is that same as BASH $<variable-name>?

Either case, you're either running BASH or something else. In Linux your environment sometimes contains your shell, so if you type:
Code:
env | grep -i shell
SHELL=/bin/bash
at a terminal or command prompt it should print out your shell. Or if you do:
Code:
which sh
ls -l <result of the which command>

Example:
$ which sh
/bin/sh
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2010-11-29 15:35 /bin/sh -> bash
This tells me that my shell is using bash.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ShellScript executed from command prmpt but not executed from crontab or at command BMMadhav Linux - Newbie 1 11-16-2012 07:20 PM
[SOLVED] Checking the result from a command executed. Jakkie Linux - Newbie 6 02-14-2012 09:16 AM
command for checking PSU status shinn AIX 3 03-14-2010 08:03 AM
command(s) for checking ip status stupidloser Linux - Wireless Networking 5 08-10-2004 10:21 AM
checking the status of PPP0 pudhiyavan Linux - Networking 6 01-14-2004 02:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration