Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the methods that call, reference, and contain another script file in Shell

Shulou Source: shulou.com Published: 2022-06-03 07:50:45 11月15日 Update

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!

Tags: Methods scripts files content more knowledge practicality achievement next dilemma reality situation articles cases examples ribbons websites industries processes high quality Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information vpn Shulou Tech Info Shulou Technology MariaDB