How to print pid of the current shell?



How to print pid of the current shell?..

Answer / Deep Kamal Tiwari

To print the PID (Process ID) of the current shell, you can use the following command:n```bashnecho $$n``

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Shell Script Interview Questions

How do you rename the files(*.sh) with file names containing space in it?for example "interview question.sh" needs to rename to "interview-question.sh". Appreciate your inputs.Thanks.

5 Answers   Wells Fargo,


how will you find the total disk space used by a specific user?

1 Answers  


What does $0 mean in shell script?

1 Answers  


if i have 2 files file1 and file2.... file1 contains 2 columns like b a 11 aa 12 as 13 ad 15 ag 11 ar 13 ah 15 ak file2 contains b c 10 ds 11 at 15 gh 15 jk 13 iu 11 fg 13 yy can any 1 give me the program to display in this way? a b c aa 11 at ar 11 fg ad 13 iu ah 13 yy ag 15 gh ak 15 jk

3 Answers  


How will you find the 99th line of a file using only tail and head command?

1 Answers  


How to pass an argument to a script?

1 Answers  


What is shell and shell script?

1 Answers  


How do you know which shell I am using?

1 Answers  


How will you pass and access arguments to a script in linux?

1 Answers  


I want to connect to a remote server and execute some commands, how can I achieve this?

1 Answers  


How Connect to a Database in Shell Programming?

4 Answers   Syntel,


What happens on a system call?

1 Answers  


Categories