Raspberry Pi Shell script file

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.