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

What does bash mean in linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces what bash means in linux. The article is very detailed and has certain reference value. Interested friends must read it!

Linux bash is a command processor that usually runs in a text window and can execute commands entered directly by the user;Bash can also read commands from files, such files are called scripts; like other Unix shells, it supports filename substitution, pipes, here documents, command substitution, variables, and so on.

Operating environment: linux 5.9.8 system, Dell G3 computer.

Bash, a Unix shell, was written in 1987 by Brian Fox for the GNU Project. The first official version was released in 1989 and was originally intended for GNU, but ran on most Unix-like operating systems, including Linux and Mac OS X v10.4, which used it as the default shell.

Bash is a successor compatible and open-source version of the Bourne shell, and its name comes from a pun for Bourne shell (sh): Bourne-Again SHell.

Bash is a command processor that usually runs in a text window and can execute commands entered directly by the user. Bash can also read commands from files called scripts. Like other Unix shells, it supports file name substitution (wildcard matching), pipes, here documents, command substitution, variables, and conditional and loop control statements. Basic features, including keywords and syntax, are borrowed from sh. Other features, such as the history command, are borrowed from csh and ksh. Overall, Bash, while a POSIX shell, has many extensions.

A security flaw called Shellshock was discovered in early September 2014 and quickly led to a series of attacks on the Internet. The vulnerability dates back to version 1.03, released in 1989.

bash command syntax is a superset of Bourne shell command syntax.

Most of Bourne's vast number of shell scripts can be executed in bash without modification, except for scripts that reference Bourne special variables or use Bourne's built-in commands. bash's command syntax comes from many sources such as the Korn shell (ksh) and C shell (csh), such as command-line editing, command history, directory stacks,$RANDOM and $PPID variables, and POSIX's command substitution syntax: $(...). As an interactive shell, pressing TAB automatically completes partially typed program names, file names, variable names, etc.

Bash's function declaration is incompatible with Bourne/Korn/POSIX scripts when using the 'function' keyword (the Korn shell has the same problem). However, Bash also accepts Bourne/Korn/POSIX function declaration syntax. Because of the many differences, Bash scripts rarely run in Bourne or Korn interpreters unless they are deliberately written to maintain compatibility. However, with the popularity of Linux, this approach is becoming less and less common. However, in POSIX mode, Bash is more POSIX compliant.

That's what bash means in linux. Thank you for reading this article! 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.

Share To

Servers

Wechat

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

12
Report