What is the significance of the $$ variable in a shell script?

  • It represents the parent process ID.
  • It represents the user's home directory.
  • It represents the current working directory.
  • It represents the process ID of the current script.
The correct answer is d) It represents the process ID of the current script. The $$ variable is used to access the unique process identifier assigned to the running script. It's valuable for tasks like creating temporary files or ensuring script uniqueness.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *