In principle, you can add to the script any command that you can enter inside the terminal itself. Then you have two options for doing it:
- Run it from the terminal using
sh your_script.sh . You do not even need to grant permission to implement this decision. - Give it permission to run and run it with
./your_script.sh .
For the second solution, you should run the file with what is called shebang . So your script will look like this:
#!/bin/sh cp path/to/source path/to/destination cp path/to/source path/to/destination cp path/to/source path/to/destination ldconfig echo "Done!"
Nothing else. Just write commands one by one. The first line is the so-called shebang and tells the shell that the interpreter should use for the script.
Note. The extension for shell scripts is usually .sh , but you can actually name your file as you prefer. Extension does not matter.
Good scripting!
Zagorax
source share