What does $? return in Schell scripting? - ProProfs Discuss
Advertisement

What does $? return in Schell scripting?

What does $? return in Schell scripting?<br/>

Change Image    Delete

Asked by Centurians, Last updated: Apr 14, 2024

+ Answer
Request
Question menu
Vote up Vote down

3 Answers

M. Porter

M. Porter

Here to relax my mind a bit

M. Porter
M. Porter, Senior Executive, Master of Art, San Jose

Answered Dec 14, 2018

In Schell scripting, $? will return exit status of command .0 if command gets successfully executed, non-zero if the command failed. Schell scripts are computer programs ran by Unix Schell that create shortcuts for your computer as well as generalization and batch tasks.

In order to start trying to develop software, you will use Schell scripts to identify exactly what each command represents. Although Schell scripts are incapable of providing a return string during batch functions, they can share a specific variable, return an exit status and they can echo, or report a copy of, a different string.

upvote downvote
Reply 

g.Kenneth

g.Kenneth

g.Kenneth
G.Kenneth

Answered Jan 24, 2018

Shell scripts are computer programs. It is run by Unix Shell. Shell scripts are capable of making shortcuts. They can also do batch jobs and generalization. At the beginning of the development of the software, the shell scripts play a role in the first stage. When something is entered into the command line, then that is exactly what it is in the commands.

This can be considered as an advantage. In shell scripting, a bash function is not capable of a return string, but there are some things that can happen. First, you can echo a string. Next, return an exit status because it is a number. It is not a string. Third, share a variable. This will help with returning a shell scripting.

upvote downvote
Reply 

John Smith

John Smith

John Smith
John Smith

Answered Jan 02, 2017

$? will return exit status of command .0 if command gets successfully executed ,non-zero if command failed.
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.