In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the use of linux bash command shell script interpreter, the text is very detailed, has a certain reference value, interested friends must read!
bash is a Unix shell written for the GNU Project. Its name is a series of abbreviations: Bourne-Again Shell -a pun on Bourne shell (sh)(Bourne again / born again).
bash is the default shell for most Linux systems and Mac OS X, and runs on most Unix-like operating systems, and has even been ported to Cygwin on Microsoft Windows to implement Windows POSIX virtual interfaces. It was also ported to MS-DOS by the DJGPP project.
Syntax format: bash [parameter] [file]
Common parameters:
-n checks whether the script is correct and does not execute the script-x executes the script and outputs the execution procedure-cbash reads the command from the string, and if there are variables after the string, it is set to the position parameter starting from $0.
Reference Example
Use the-n parameter to check the script syntax correctly:
[root@linuxcool ~]# bash -n linuxcool.sh
Execute the linuxcool.sh script with the-x argument and output the execution process:
[root@linuxcool ~]# bash -x linuxcool.sh ifconfig eth0: flags=4163 mtu 1500 inet 192.168.3.21 netmask 255.255.255.0 broadcast 192.168.3.255 inet6 fe80::20c:29ff:fe73:4b2f prefixlen 64 scopeid 0x20 ether 00:0c:29:73:4b:2f txqueuelen 1000 (Ethernet) RX packets 1175439 bytes 578279763 (551.4 MiB) RX errors 0 dropped 1574 overruns 0 frame 0 TX packets 165889 bytes 54096266 (51.5 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1 (Local Loopback) RX packets 538814 bytes 310506969 (296.1 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 538814 bytes 310506969 (296.1 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 The above is all the content of the bash command shell script interpreter using linux. Thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!
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.