What are the methods that call, reference, and contain another script file in Shell
This article introduces the relevant knowledge of "what are the methods of calling, quoting, and including another script file in Shell?". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Script first (test example 1)
First
#! / bin/bash
Echo 'your are in first file'
Method 1: use source
#! / bin/bash
Echo 'your are in second file'
Source first
Method 2: use.
#! / bin/bash
Echo 'your are in second file'
. First
Method 3: use sh
#! / bin/bash
Echo 'your are in second file'
Sh first
This is the end of the content of "what are the methods to call, reference, and include another script file in Shell?" Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!