what is the cmd to display the last exit status in UNIX?

Answers were Sorted based on User's Feedback



what is the cmd to display the last exit status in UNIX?..

Answer / arvind kumar

echo $? will give you status og last command.

Is This Answer Correct ?    18 Yes 0 No

what is the cmd to display the last exit status in UNIX?..

Answer / siva

Try this command

$?

Is This Answer Correct ?    11 Yes 2 No

what is the cmd to display the last exit status in UNIX?..

Answer / arjun

$? it will give the status of the previous command
it will give 0(zero) last command is successful else it will
give any non-zero character.

Is This Answer Correct ?    6 Yes 0 No

what is the cmd to display the last exit status in UNIX?..

Answer / arun kumrr

echo $?

Is This Answer Correct ?    4 Yes 0 No

what is the cmd to display the last exit status in UNIX?..

Answer / kk11749

$?

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More Unix Commands Interview Questions

What is s and g in sed command?

0 Answers  


A file has 1000 lines and i want to display only 1st line how to do it? pls ..tel me

7 Answers   CTS,


What are awk commands?

0 Answers  


How to rename files and folders?

7 Answers   IBM, Oracle,


what is the command to find out the difference between files and folders?

6 Answers  






Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?

0 Answers  


Who command in unix?

0 Answers  


How to get the operating system's information in unix?

6 Answers   IBM, TCS,


What happens when we execute a unix command?

0 Answers  


distinguish between interrupts and exceptions?

2 Answers   Infosys, Wipro,


How many unix commands are there?

0 Answers  


What difference between cmp and diff commands?

0 Answers  


Categories