In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. Directly. / add the file name .sh. For example, run hello.sh as. / hello.sh [hello.sh must have x permission]
2. Add the file name .sh directly to sh. For example, run hello.sh as sh hello.sh [hello.sh may not have x permission]
Method 1: execute .sh files in the current directory
[step 1] cd to the directory where the .sh file is located
For example, take the hello.sh file as an example, as shown below
[step 2] add x execution permissions to the .sh file
For example, take the hello.sh file as an example, chmod uplix hello.sh, as shown in the following figure
[step 3]. / execute the .sh file
For example, take the hello.sh file as an example. / hello.sh can execute the hello.sh file, as shown in the following figure
[step 4] sh executes the .sh file
Take the hello.sh file as an example, sh hello.sh can execute the hello.sh file, as shown below
Method 2: execute .sh file by absolute path
The following three methods are fine, as shown in the following figure:
. / home/test/shell/hello.sh/home/test/shell/hello.shsh / home/test/shell/hello.sh
These are the details of how to run .sh files under linux. Please pay more attention to other related articles!
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.