I have written a shell script named startup.sh which does a lot of things (basically start a lot of things for me after turning on my local machine) - here is an excerpt:
#!/bin/bash
gnome-terminal --tab &
veracrypt --auto-mount favorites &
thunderbird &
~/Application/IDEA/bin/./idea.sh &
/usr/bin/slack &
echo myuser mypass | skypeforlinux --pipelogin &
sh bsync-project-folder.sh &
exit
Open a console window and do:
. startup.sh
The shell script is executed and the window is closed afterwards.
Also working:
sh startup.sh
OR
./startup.sh
The shell script is executed and the terminal window stays open - however it does not return to the console and have to stop script execution with CTRL + C
(no matter if I execute with the command line interpreter or with ./
).
However I want a clean exit of my script and then return to the same console with a success message. What am I missing?
&
– Jeff Schaller Nov 14 '18 at 13:32ps
? Have you typed “Enter”? See this. But, really, runps
and see what (if anything) is running in that terminal. – G-Man Says 'Reinstate Monica' Nov 14 '18 at 22:05Everybody has more or less knowledge depending on the topic. If there is already an answer to a question just mark the corresponding duplicate.
– Blackbam Nov 14 '18 at 23:29