echo command in linux is used to display line of text/string that are passed as an argument . This is a built in command that is mostly used in shell scripts and batch files to output status text to the screen or a file.
How does echo command work?
echo is a built-in command in the bash and C shells that writes its arguments to standard output. … When used without any options or strings, echo returns a blank line on the display screen followed by the command prompt on the subsequent line.
What is echo $? In Linux?
echo $? will return the exit status of last command. … Commands on successful completion exit with an exit status of 0 (most probably). The last command gave output 0 since the echo $v on the line previous finished without an error. If you execute the commands. v=4 echo $v echo $?