March 31, 2016

what is the meaning of $ in linux command?

Answer to the question

$ usually means means one of two things:

If a tutorial say to run

$ ls

it means you should run the command "ls" (without the $) as a regular user, as opposed to running it asĀ  root. If you're told to run something like

echo $TERM

the $ is referencing a variable, in this case TERM.

Here's a quick explanation of what that does:

If you run the command

echo hi

your terminal will output "hi". If you run "echo $TERM", $TERM is replaced with the value of the variable TERM. If you actually run "echo $TERM", you will usually end up with either "xterm" or "xterm-256color"

Like  (0 likes)

Answer to the question

Here's a pretty good explanation , at least in a shell script ...

http://superuser.com/questions/247127/what-is-and-in-linux/247131

Like  (0 likes)
Click Here!