i have a script which is the main one and this script open a new terminal and execute another script so what i want is to pass the PID of the second script to the first script
the main script
#!/bin/bash gnome-terminal -e "/home/......./script.sh"
#!/bin/bash PID= $$
i want to pass the variable called PID to the main script