How to Write Shell Script to Start Some Programs?

How to Write Shell Script to Start Some Programs?

I'm making a shell script that will start bunch on programs that l mostly use. I wants commands for them the programs are- 1. skype 2. sublime-text 3. google-chrome 4. Beyond-comopare 5. scudCloud 6. Lampp

i've found some of them-

#! /bin/sh
sudo service mysql stop
sudo /opt/lampp/lampp start
sudo /usr/bin/skype start
sudo /usr/bin/subl start
sudo google-chrome

I know the application can be set from startup application also but i need to run some command also.

After running command bash shell script will run.

9

2 Answers

Your script with further two entries:

$ cat launchscript.sh
#! /bin/sh
sudo service mysql stop
sudo /opt/lampp/lampp start
sudo /usr/bin/skype start
sudo /usr/bin/subl start
sudo google-chrome
sudo scudcloud 
sudo bcompare

Make it executable:

sudo chmod +x launchscript.sh

Run it:

./launchscript.sh
3

Put the script to run all the services inside init.d directory to make them run at startup.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Elena Rostova
Author

Elena Rostova

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.