LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-13-2004, 03:09 AM   #1
huangyanfeng
LQ Newbie
 
Registered: Oct 2003
Posts: 11

Rep: Reputation: 0
Question Create file using 'touch ./tmp.$$', file tmp.3941 is created, why?


Create file using 'touch ./tmp.$$', file tmp.3941 is created, why?
 
Old 04-13-2004, 03:36 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Because $$ is a bash-variable, it hold the PID of
the process invoking it, in other words, the pid of
the shell you used to touch. It will vary in other
shells ;)


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
file in /tmp is lost ust Linux - General 3 03-02-2005 08:52 PM
the file in the path /tmp is lost ust Linux - General 2 02-22-2005 08:38 PM
file:/tmp - mysterious contents. Rm, or not rm? linuxfond Linux - Newbie 5 06-12-2004 02:00 PM
eroaster tmp file write davidschob Linux - Software 4 11-05-2003 09:36 AM
ERROR: Couldn't create temporary file in /tmp/ bananaman Linux - Newbie 5 04-09-2003 09:52 AM


All times are GMT -5. The time now is 09:55 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration