What is the use of dollar in shell script?

Nguyên Lê

New member
What is the use of dollar in shell script?
Answer
This control operator is used
to check the status of last executed command
. If status shows ‘0’ then command was successfully executed and if shows ‘1’ then command was a failure. The exit code of the previous command is stored in the shell variable $?.
 

Tìm kiếm

Back
Top