I've always wondered about this what does the "$" indicate in the terminal/command line
I've always wondered about this what does the "$" indicate in the terminal/command line
Antec 300 Illusion__________MSI 770-G45 AM3
AMD X6 3.0Ghz____________4gig ddr3 1600 GSKILL
1tb Seagate hd____________ATI 5850 xfx(OC soon)
_____________750w diablotek psu_______________
Backtrack - Giving machine guns to monkeys since 2006
Kali-Linux - Adding a grenade launcher to the machine guns since 2013
Pretty much it's just there as a separator between the prompt and what you actually type. It's like the > in a Windows/DOS prompt.
on Linux (or any other system that uses bash or a similar shell) is pretty much the same as:Code:username@computer:~$
on Windows.Code:C:\My Documents>
Traditionally, a shell prompt either ends with $, % or #. If it ends with $, this indicates a shell that's compatible with the Bourne shell (such as a POSIX shell, or a Korn shell, or Bash). If it ends with %, this indicates a C shell (csh or tcsh). If it ends with #, this indicates that the shell is running as the system's superuser account (root), and that you should be extra careful.
Prompts are often highly individualized. Your Bash prompt will probably be much longer than $.
Also in Bash, $ usually means "Expand". It is not part of your variable name! You can expand "$variable" content, "$(command)" output or "$((arithmetic))" results.
Used as a special parameter $ expands to the PID of the shell: echo $$
Bash also supports $"..." quoting syntax for locale-specific translation. If the current locale is C or POSIX, the dollar sign is ignored. If the string is translated and replaced, the replacement is double-quoted.
Bash also has a special form of quoting, $'string' in which backslash-character combinations are expanded. For example, echo $'this is a literal tab: \t'
$[...] is an obsolete, deprecated syntax for math.
gee I wanted to know too. thanks
Monitor: LG flatron w1954s 22", mobo: G31-m7 series, CPU: Intel LGA 775 Intel core duo 2 2,66GHZ, RAM: 3GB, GPU: ATI Radeom HD 2400, Storage: 500GB SATA and 80GB IDE, Windows 7 ultimate and Ubuntu
thanks a bunch guys! Very helpful
Antec 300 Illusion__________MSI 770-G45 AM3
AMD X6 3.0Ghz____________4gig ddr3 1600 GSKILL
1tb Seagate hd____________ATI 5850 xfx(OC soon)
_____________750w diablotek psu_______________
Bookmarks