Raspberry Pi Shell script file
Commands can be combined and saved in a file for execution. In a silly example, copy the following command to your favorite Text Editor:
While 1 doecho Raspberry Pi! Done
Now, save it as a file named fun-script. Before you run this file, you need to set it as an executable file. You can use commands in the modify mode.Chmod. Each file and folder has its own permissions to limit which users can operate on it or cannot operate on it. In this example, runChmod + x fun-scriptAnd the fun-script file becomes an executable file. You can enter./Fun-scriptTo run this file (of course, this file must be in your current directory ). This script will output "Raspberry Pi!" infinitely !", Can be used to stop a loopCtrl + CKey. This will kill the commands (processes) running on the current terminal ).
Address: http://www.raspberrypi.org/documentation/linux/usage/scripting.md