Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Bash.shell summary

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

# nano filename.sh

The creation file ends with .sh. Represents a script file

#! / bin/bash

Means to use bash for interpretation

If judgment condition; then

Echo "yes."

Else

Echo "no."

Fi

Step-by-step implementation of bash-x [easy to check in the end the ability is wrong]

Bash-n test for syntax errors

Multi-branch if statement

If judgment condition; then

Execution

Elif judgment condition; then

Execution

Elif judgment condition; then

Execution

Else

Execution

Fi

If if then then, then elif is not; if else other, if. Otherwise, the fi ends if it exists, otherwise & & | | otherwise if it does not exist! & & | if it doesn't exist and otherwise! & | |! It means to take the reverse & > / dev/null trash can {put here not shown} position variable; $1 / 1 / 2 / 3. Represents a special variable; $? $# $* $@

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report