what does echo $$ command display


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting what does echo $$ command display
# 1  
Old 03-06-2007
what does echo $$ command display

whats the value stored in $$
# 2  
Old 03-06-2007
Is it a homework ?

The $$ variable holds the process ID of the script in which it appears.
# 3  
Old 03-06-2007
Quote:
Originally Posted by jacoden
Is it a homework ?

The $$ variable holds the process ID of the script in which it appears.
process id of the current shell from which $$ is executed
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to echo command successful if command is executed successfully

Hello, I have written a command n shell script : srvctl relocate service -d t1 -s s1 -i i1 -t t1 -f If the above command executes successfully without error I need to echo "Service relocated successfully and If it errors out I need to trap the errors in a file and also need to make... (1 Reply)
Discussion started by: Vishal_dba
1 Replies

2. Shell Programming and Scripting

display echo only once

lets say I am printing something out echo "Please enter a valid username" and its being printed out 5 times, is there any way I can limit to only being displayed ONCE. I tried echo -n but that just makes everything fit on one line. Right now it keeps saying Please enter a valid... (5 Replies)
Discussion started by: subway69
5 Replies

3. Homework & Coursework Questions

Using ls or echo to display a specific output

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: What single command line would you enter to get the following output? 8140 drwxr-xr-x 9 root bin 18 Jan 20... (6 Replies)
Discussion started by: dasboot
6 Replies

4. Shell Programming and Scripting

Display and write in file in one echo command

Hi All, I want to display content on command promt and also write in file. For that iI ahve to write two sentence echo "XXXXXXX" echo "XXXXXXXX" >> 1.txt Is there any way to write in one echo statement (1 Reply)
Discussion started by: vivek1489
1 Replies

5. Shell Programming and Scripting

echo display problem

Hi I am facing a strange problem a=03 echo ${a} the output is 3 But i want to display it is 03 Can you people help me how to display it like 03. Thanks (2 Replies)
Discussion started by: aishsimplesweet
2 Replies

6. Shell Programming and Scripting

Display echo results in three column

Dear Friends, I have my command output which displays on one row and values are now scrollable (vertical) 3 pages. How do i display those output in three column so that i no need to scroll? Example: dcadd$cat components 1.Caluculator 2.Diary ... ... 50.Mobile 51.Battery .. ...... (12 Replies)
Discussion started by: baluchen
12 Replies

7. Shell Programming and Scripting

Need a Command To display "echo command value in loop" in single line.

Hi I want to display "echo command value in loop" in single line. My requirement is to show the input file (test_1.txt) like the output file (test_2.txt) given below. Input file :test_1.txt a1|b1|4|5 a1|b1|42|9 a2|b2|32|25 a1|b1|2|5 a3|b3|4|8 a2|b2|14|6 Output file:test_2.txt... (2 Replies)
Discussion started by: sakthifire
2 Replies

8. SuSE

inconsistent ls command display at the command prompt & running as a cron job

Sir, I using the following commands in a file (part of a bigger script): #!/bin/bash cd /opt/oracle/bin ls -lt | tail -1 | awk '{print $6}' >> /tmp/ramb.out If I run this from the command prompt the result is: 2007-05-16 if I run it as a cron job then... (5 Replies)
Discussion started by: rajranibl
5 Replies

9. Shell Programming and Scripting

Echo display alignment/sort order

Hi, My script prints a few varibales as each it reads each line of a text file and then prints them on screen, however iam having problem in aligning and sorting them. what happens is this Last First Number Mark leo 87798798... (1 Reply)
Discussion started by: shackman66
1 Replies

10. UNIX for Dummies Questions & Answers

Display from a variable using echo.

I have a variable that is outputting a lot of space. here has been 45 lines returned ... how can I remove the spaces between the "been and the 45" CODE: fil_len=`wc -l < coshb.txt` if ; then cat coshb.txt | more echo " " echo "There has been ${fil_len} lines... (4 Replies)
Discussion started by: jagannatha
4 Replies
Login or Register to Ask a Question