File Explorer

/proc/thread-self/root/proc/self/root/proc/thread-self/root/usr/share/doc/bash

This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.

INTRO6.9 KB · 188 lines
		       BASH - The Bourne-Again Shell Bash is the shell, or command language interpreter, that will appearin the GNU operating system.  Bash is an sh-compatible shell thatincorporates useful features from the Korn shell (ksh) and C shell(csh).  It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2Shell and Tools standard.  It offers functional improvements over shfor both programming and interactive use.  In addition, most sh scriptscan be run by Bash without modification.  Bash is quite portable.  It uses a configuration system that discoverscharacteristics of the compilation platform at build time, and maytherefore be built on nearly every version of UNIX.  Ports toUNIX-like systems such as QNX and Minix and to non-UNIX systems suchas OS/2, Windows 95, and Windows NT are available.  Bash includes the following features: Editing and Completion Bash offers a command-line editing facility which permits users toedit command lines using familiar emacs or vi-style editing commands.Editing allows corrections to be made without having to erase backto the point of error or start the command line anew.  The editingfacilities include a feature that allows users to complete command andfile names. The Bash line editing library is fully customizable.  Users may definetheir own key bindings -- the action taken when a key is pressed.  Anumber of variables to fine-tune editing behavior are also available. History and Command Re-entry The Bash history feature remembers commands entered to the shell andallows them to be recalled and re-executed.  The history list may beof unlimited size.  Bash allows users to search for previous commandsand reuse portions of those commands when composing new ones.  Thehistory list may be saved across shell sessions.  Bash allows users to control which commands are saved on the historylist. Job Control On systems that support it, Bash provides an interface to theoperating system's job control facilities, which allow processesto be suspended and restarted, and moved between the foregroundand background.  Bash allows users to selectively `forget' aboutbackground jobs.  Shell Functions and Aliases These mechanisms are available to bind a user-selected identifier to alist of commands that will be executed when the identifier is used asa command name.  Functions allow local variables and recursion, andhave access to the environment of the calling shell.  Aliases may beused to create a mnemonic for a command name, expand a single word toa complex command, or ensure that a command is called with a basic setof options.  Arrays Bash-2.0 supports indexed arrays of unlimited size.  The subscript foran array is an arithmetic expression.  Arrays may be assigned to witha new compound assignment syntax, and several builtins have options tooperate on array variables.  Bash includes a number of built-in arrayvariables. Arithmetic Bash allows users to perform integer arithmetic in any base from twoto sixty-four.  Nearly all of the C language arithmetic operators areavailable with the same syntax and precedence as in C.  Arithmeticexpansion allows an arithmetic expression to be evaluated and theresult substituted into the command line.  Shell variables can be usedas operands, and the value of an expression may be assigned to avariable.  An arithmetic expression may be used as a command; the exit status ofthe command is the value of the expression. ANSI-C Quoting There is a new quoting syntax that allows backslash-escaped charactersin strings to be expanded according to the ANSI C standard. Tilde Expansion Users' home directories may be expanded using this feature.  Wordsbeginning with a tilde may also be expanded to the current or previousworking directory. Brace Expansion Brace expansion is a convenient way to generate a list of strings thatshare a common prefix or suffix. Substring Capabilities Bash allows new strings to be created by removing leading or trailingsubstrings from existing variable values, or by specifying a startingoffset and length.  Portions of variable values may be matched againstshell patterns and the matching portion removed or a new valuesubstituted.  Indirect Variable Expansion Bash makes it easy to find the value of a shell variable whose name isthe value of another variable. Expanded I/O Capabilities Bash provides several input and output features not available in sh,including the ability to: 	o specify a file or file descriptor for both input and output	o read from or write to asynchronous processes using named pipes	o read lines ending in backslash	o display a prompt on the terminal before a read	o format menus and interpret responses to them	o echo lines exactly as input without escape processing Control of Builtin Commands Bash implements several builtin commands to give users more controlover which commands are executed.  The enable builtin allows otherbuiltin commands to be selectively enabled or disabled.  The commandand builtin builtins change the order in which the shell searches forcommands.  On systems that provide dynamic loading, new builtins may be loadedinto a running shell from a shared object file.  These new builtinshave access to all of the shell facilities. Help Bash includes a built-in help facility. Shell Optional Behavior There is a great deal of customizable shell behavior.  The shoptbuiltin command provides a unified interface that allows users toalter shell defaults.  Prompt Customization Bash allows the primary and secondary prompts to be customized byinterpreting a number of backslash-escaped special characters. Parameter and variable expansion is also performed on the values ofthe primary and secondary prompt strings before they are displayed.  Security Bash provides a restricted shell environment.  It is also possible tocontrol the execution of setuid/setgid scripts.  Directory Stack Bash provides a `directory stack', to which directories may be addedand removed.  The current directory may be changed to any directory inthe stack.  It is easy to toggle between two directories in the stack. The directory stack may be saved and restored across different shellinvocations.  POSIX Mode Bash is nearly completely conformant to POSIX.2.  POSIX mode changesthose few areas where the Bash default behavior differs from thestandard to match the standard.  In POSIX mode, Bash is POSIX.2compliant.  Internationalization Bash provides a new quoting syntax that allows strings to betranslated according to the current locale.  The locale in which theshell itself runs may also be changed, so that the shell messagesthemselves may be language-specific.  The command-line editing facilities allow the input of eight-bitcharacters, so most of the ISO-8859 family of character sets aresupported.  Command Timing Bash allows external commands, shell builtin commands and shell functionsto be timed.  The format used to display the timing information may bechanged by the user.