Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux: what does echo $! in Linux? [closed]

Tags:

shell

Can anyone tell me what does echo $! mean and how it comes(meaning of '$' and '!')?

like image 226
cache Avatar asked Jul 06 '12 20:07

cache


People also ask

What is echo $! In Linux?

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. Syntax : echo [option] [string]

What does echo with >> symbol do?

redirects the output of the command on its left hand side to the end of the file on the right-hand side.

What is the output of echo in Linux?

The echo command writes text to standard output (stdout). The syntax of using the echo command is pretty straightforward: echo [OPTIONS] STRING... Some common usages of the echo command are piping shell variable to other commands, writing text to stdout in a shell script, and redirecting text to a file.


1 Answers

$! PID of last job running in background.

like image 121
Otto Allmendinger Avatar answered Oct 21 '22 05:10

Otto Allmendinger