Process ID of the current script

Given that $$ in the below given bash script represents the process ID of the current script.

echo $$ - (i)
echo $(echo $$) - (ii)

What can be said about the output produced by (i) and (ii)?

Options
  1. Output of (i) and (ii) are same.
  2. (i) throws an error while output of (ii) is an integer.
  3. (ii) throws an error while output of (i) is Integer.
  4. Both (i) and (ii) throw an error

Related Posts

Close Bitnami banner
Bitnami