Execute another shell script in the shell script

Source: Internet
Author: User

Category:

 

You can execute another shell script (or non-executable file, mainly used to obtain the value of some variables) in one shell script :. file name (including path) or variable = file name (including path ). $ variable Note: there is a space behind the dot. In this way, some variables declared in other files can be referenced in the later part of this shell script. When I use these variables to execute 3rd scripts, I don't know what is going on, and there are always some inexplicable errors. I found that only this file does not contain blank lines, even if there is only one annotator, there will be no error, that is, the rows cannot be empty. In fact, I think this is not the problem, but the difference between processing characters in Windows and Linux. When I write some shell scripts in windows and run them on Linux, errors will often occur, and the display will not be different, that is, running errors, it is often said that the interpreter is wrong and so on, it is puzzling. Therefore, it is best to directly edit it in Linux, as the problem of having to be empty just now suddenly does not exist.

Execute another shell script in the shell 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.