Linux Learning Note Shell (ii)--Automation script

Source: Internet
Author: User

This article references: Shell Scripting Learning Guide

This article reads as follows: Know the shell directive, but do not know how to complete an automated shell script.

Because when editing this article, the author is also a novice. So, in some theories, there may be errors. If there is an error, you want to indicate (can send email:[email protected]).

This article is updated periodically. Until there is a relatively well-developed version.

One: How to get the system to recognize, as well as some upfront details.

1, how the system recognizes: when the system executes an executable file, it finds that it is not an executable format. The kernel receives an error message: This file is not an executable file. At this point, an attempt is attempted to invoke the Invoke interpreter.

2, how to determine the interpreter: The first line of the file needs to be added: #! Symbol. If you want to use the shell, you can add: #! /usr/sh-f. Other interpreters can also use this method, for example: AWK

3, details.

1) #! This line is not recommended for more than 64 characters. (usually not more than)

2) #! With the absolute path. There may be differences in the location of the interpreter between different systems.

Two: some scripting experience.

  

Linux Learning Note Shell (ii)--Automation script

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.