Anderson Green
Anderson Green

Reputation: 31850

How can I start a shell script in the terminal, using a shell script command?

I'd like to write a shell script that starts running another shell script in a separate terminal window. Which command should I use to run the following shell script in the terminal?

#!/bin/sh
#name of this script: install applications.sh
sudo apt-get update  # To get the latest package lists
sudo apt-get install docky -y
#etc.

Upvotes: 0

Views: 316

Answers (1)

jordanm
jordanm

Reputation: 34974

This depends on the terminal emulator your want to launch. Here are two examples:

xterm -e 'bash applications.sh'
gnome-terminal -e 'bash applications.sh'

Upvotes: 2

Related Questions