LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-21-2011, 07:21 AM   #1
Voyager7
LQ Newbie
 
Registered: Jan 2011
Posts: 12

Rep: Reputation: 0
What does $$ do


hi,
What does $$ do?
it gives back a number but what is it?
Also what are these $?, $$ called?
Having a tough time googling them, so their generic name would help

Thnx
 
Old 01-21-2011, 07:34 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Here you go:
http://tldp.org/LDP/abs/html/interna...s.html#PROCCID

HTH
 
Old 01-21-2011, 09:51 AM   #3
Soji Antony
Member
 
Registered: Jul 2010
Posts: 54

Rep: Reputation: 1
$$ is the PID( Process id) of the current process.
For example
Code:
echo $$
gives pid of current shell.

Hope this helps

Last edited by Soji Antony; 01-21-2011 at 09:54 AM.
 
Old 01-21-2011, 10:00 AM   #4
Soji Antony
Member
 
Registered: Jul 2010
Posts: 54

Rep: Reputation: 1
Code:
man bash
will give you a detailed explanation

Code:
Special Parameters
?      Expands to the exit status of the most recently executed foreground pipeline.
$      Expands  to  the  process  ID of the shell.  In a () subshell, it expands to the process ID of the current shell, not the subshell.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration