LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, 06: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, 12:58 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,087
Blog Entries: 10

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:20 PM
[SOLVED] Checking the result from a command executed. Jakkie Linux - Newbie 6 02-14-2012 10:16 AM
command for checking PSU status shinn AIX 3 03-14-2010 09:03 AM
command(s) for checking ip status stupidloser Linux - Wireless Networking 5 08-10-2004 11:21 AM
checking the status of PPP0 pudhiyavan Linux - Networking 6 01-14-2004 03:47 AM


All times are GMT -5. The time now is 01:03 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration