Using Shell Scripts

Shell scripts can be helpful for organizing sequences of terminal commands to execute them in a specific order with a single call. Shell scripts usually have the extension .sh and should start with a so called shebang (#!...), telling the interpreter what binary to use. After that, single commands can be added as separate lines, just as using them in the terminal. The following script starts the JACK server in the background, waits for 3 seconds and afterwards launches the simple client, playing a sine tone.

#! /bin/bash

jackd &
sleep 3

The script can be executed from its source location as follows:

$ bash

Shell scripts can be made executable with the following command:

$ chmod +x

Afterwards, they can be started like binaries, when including the correct shebang:

$ ./


Create an executable shell script in your personal directory on the server. Use the echo command in that script to print a simple message and run the file via SSH.