In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly analyzes how Linux runs sh files related knowledge points, the content is detailed and easy to understand, the operation details are reasonable, and it has certain reference value. If you are interested, you may wish to follow Xiaobian to have a look. Let's follow Xiaobian to learn more about "how Linux runs sh files".
Method 1: absolute path execution.sh file 1, the following three methods can be, as shown in the following figure
Copy content to clipboard
./ home/test/shell/hello.sh
/home/test/shell/hello.sh
sh /home/test/shell/hello.sh
Method 2: Execute.sh file in current directory 1, cd to directory where.sh file is located
For example, take hello.sh file as an example, as shown below
2. Add x execute permissions to the.sh file
For example, take hello.sh file as an example, chmod u+x hello.sh, as shown below
3、./ Execute.sh file
Take hello.sh file for example,./ hello.sh can execute hello.sh file, as shown below
4. sh Executes.sh file
Take hello.sh file as an example, sh hello.sh can execute hello.sh file, as shown below
Note: Use ".../ "When adding file name.sh to execute, you must add x execution permission to the.sh file.
About "Linux how to run sh file" introduced to this, more related content can be searched for previous articles, hope to help you answer questions, please support the site more!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.