|s i s t e m a o p e r a c i o n a l m a g n u x l i n u x||~/ · documentação · suporte · sobre|
This HOW-TO will try to give you some hints about shell script programming strongly based on examples.
In this section you'll find some little scripts which will hopefully help you to understand some techniques.
This script has only two lines. The first indicates the system which program to use to run the file.
The second line is the only action performed by this script, which prints 'Hello World' on the terminal.
If you get something like ./hello.sh: Command not found. Probably the first line '#!/bin/bash' is wrong, issue whereis bash or see 'finding bash' to see how sould you write this line.
In this script, instead of printing a message on the terminal, we create a tar-ball of a user's home directory. This is NOT intended to be used, a more useful backup script is presented later in this document.
Next Previous Contents