Scripts

.

http://linuxcommand.org/wss0010.php       http://linuxcommand.org/writing_shell_scripts.php#contents

.

http://www.linux.com/learn/tutorials/284789-writing-a-simple-bash-script-     ++++++++

#!/bin/bash

The “#!” combo is called a shebang by most Unix geeks. This is used by the shell to decide which interpreter to run the rest of the script, and ignored by the shell that actually runs the script. Confused? Scripts can be written for all kinds of interpreters — bash, tsch, zsh, or other shells, or for Perl, Python, and so on. You could even omit that line if you wanted to run the script by sourcing it at the shell, but let’s save ourselves some trouble and add it to allow scripts to be run non-interactively.

What’s next? You might want to include a comment or two about what the script is for. Preface comments with the hash (#) character:

.

.

.

.

.

.

.

.

.

.

.

 

Leave a comment