Example: biology

Bash Reference Manual - The GNU Operating System and the ...

Bash Reference ManualReference Documentation for BashEdition , forBashVersion 2019 Chet Ramey, Case Western Reserve UniversityBrian Fox, Free Software FoundationThis text is a brief description of the features that are present in the Bash shell ( , 12 May 2019).This is Edition , last updated 12 May 2019, ofThe GNU Bash Reference Manual , forBash, Version 1988 2018 Free Software Foundation, is granted to copy, distribute and/or modify this document under theterms of the GNU Free Documentation License, Version or any later versionpublished by the Free Software Foundation; with no Invariant Sections, noFront-Cover Texts, and no Back-Cover Texts. A copy of the license is includedin the section entitled GNU Free Documentation License .iTable of Contents1 What is Bash?.. What is a shell?..12 Basic Shell Shell Shell Escape Single Double ANSI-C Locale-Specific Shell Simple Lists of Compound Looping Conditional Grouping GNU Shell Shell Positional Special Shell Brace Tilde Shell Parameter Command Arithmetic Process Word Filename Pattern Quote Redirecting Redirecting Appending Redirected R

is the default shell. Like other gnu software, Bash is quite portable. It currently runs on nearly every version of Unix and a few other operating systems independently-supported ports exist for ms-dos, os/2, and Windows platforms. ... an executable program somewhere in the file system. control operator A tokenthat performs a control function ...

Tags:

  Portable, Executable

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Bash Reference Manual - The GNU Operating System and the ...

1 Bash Reference ManualReference Documentation for BashEdition , forBashVersion 2019 Chet Ramey, Case Western Reserve UniversityBrian Fox, Free Software FoundationThis text is a brief description of the features that are present in the Bash shell ( , 12 May 2019).This is Edition , last updated 12 May 2019, ofThe GNU Bash Reference Manual , forBash, Version 1988 2018 Free Software Foundation, is granted to copy, distribute and/or modify this document under theterms of the GNU Free Documentation License, Version or any later versionpublished by the Free Software Foundation; with no Invariant Sections, noFront-Cover Texts, and no Back-Cover Texts. A copy of the license is includedin the section entitled GNU Free Documentation License .iTable of Contents1 What is Bash?.. What is a shell?..12 Basic Shell Shell Shell Escape Single Double ANSI-C Locale-Specific Shell Simple Lists of Compound Looping Conditional Grouping GNU Shell Shell Positional Special Shell Brace Tilde Shell Parameter Command Arithmetic Process Word Filename Pattern Quote Redirecting Redirecting Appending Redirected Redirecting Standard Output and Standard Appending Standard Output and Standard Here Here Duplicating File Moving File Opening File Descriptors for Reading and Executing Simple Command Command Search and Command Execution Exit Shell Shell Builtin Bourne Shell Bash Builtin Modifying Shell

2 The Set The Shopt Special Shell Bourne Shell Bash Bash Invoking Bash Startup Interactive What is an Interactive Shell?.. Is this Shell Interactive?.. Interactive Shell Bash Conditional Shell The Directory Directory Stack Controlling the The Restricted Bash POSIX Job Job Control Job Control Job Control Command Line Introduction to Line Readline Readline Bare Readline Movement Readline Killing Readline Searching for Commands in the Readline Init Readline Init File Conditional Init Sample Init Bindable Readline Commands For Commands For Manipulating The Commands For Changing Killing And Specifying Numeric Letting Readline Type For Keyboard Some Miscellaneous Readline vi Programmable Programmable Completion A Programmable Completion Using History Bash History Bash History History Event Word

3 Installing Basic Compilers and Compiling For Multiple Installation Specifying the System Sharing Operation Optional A Reporting B Major Differences FromThe Bourne Implementation Differences From The C GNU Free Documentation D Index of Shell Builtin Index of Shell Reserved Parameter and Variable Function Concept What is Bash?Bash is the shell, or command language interpreter, for thegnuoperating System . Thename is an acronym for the Bourne-Again SHell , a pun on Stephen Bourne, the authorof the direct ancestor of the current Unix shellsh, which appeared in the Seventh EditionBell Labs Research version of is largely compatible withshand incorporates useful features from the Korn shellkshand the C shellcsh. It is intended to be a conformant implementation of theieeeposixShell and Tools portion of theieee posixspecification (ieeeStandard ).

4 Itoffers functional improvements overshfor both interactive and programming thegnuoperating System provides other shells, including a version ofcsh, Bashis the default shell. Like othergnusoftware, Bash is quite portable . It currently runs onnearly every version of Unix and a few other Operating systems independently-supportedports exist forms-dos,os/2, and Windows What is a shell?At its base, a shell is simply a macro processor that executes commands. The term macroprocessor means functionality where text and symbols are expanded to create larger Unix shell is both a command interpreter and a programming language. As a com-mand interpreter, the shell provides the user interface to the rich set ofgnuutilities. Theprogramming language features allow these utilities to be combined. Files containing com-mands can be created, and become commands themselves. These new commands have thesame status as System commands in directories such as/bin, allowing users or groups toestablish custom environments to automate their common may be used interactively or non-interactively.

5 In interactive mode, they acceptinput typed from the keyboard. When executing non-interactively, shells execute commandsread from a shell allows execution ofgnucommands, both synchronously and shell waits for synchronous commands to complete before accepting more input; asyn-chronous commands continue to execute in parallel with the shell while it reads and executesadditional commands. Theredirectionconstructs permit fine-grained control of the inputand output of those commands. Moreover, the shell allows control over the contents ofcommands also provide a small set of built-in commands (builtins) implementing function-ality impossible or inconvenient to obtain via separate utilities. For example,cd,break,continue, andexeccannot be implemented outside of the shell because they directly ma-nipulate the shell itself. Thehistory,getopts,kill, orpwdbuiltins, among others, couldbe implemented in separate utilities, but they are more convenient to use as builtin com-mands.

6 All of the shell builtins are described in subsequent executing commands is essential, most of the power (and complexity) of shellsis due to their embedded programming languages. Like any high-level language, the shellprovides variables, flow control constructs, quoting, and 1: Introduction2 Shells offer features geared specifically for interactive use rather than to augment the pro-gramming language. These interactive features include job control, command line editing,command history and aliases. Each of these features is described in this DefinitionsThese definitions are used throughout the remainder of this family of open System standards based on Unix. Bash is primarily concernedwith the Shell and Utilities portion of space or tab command that is implemented internally by the shell itself, rather than byan executable program somewhere in the file operatorAtokenthat performs a control function.

7 It is anewlineor one of the following: || , && , , ;; , ; ;& , | , |& , ( , or ) .exit statusThe value returned by a command to its caller. The value is restricted to eightbits, so the maximum value is unit of text that is the result of one of the shell expansions. After expansion,when executing a command, the resulting fields are used as the command nameand string of characters used to identify a set of processes comprising a pipeline, and any processes descended from it,that are all in the same process controlA mechanism by which users can selectively stop (suspend) and restart (resume)execution of character that, when unquoted, separates words. A metacharacter is aspace,tab,newline, or one of the following characters: | , , ( , ) , < , or > .nameAwordconsisting solely of letters, numbers, and underscores, and beginningwith a letter or are used as shell variable and function referred to as operatoror aredirection operator.

8 SeeSection [Redirec-tions], page 34, for a list of redirection operators. Operators contain at leastone groupA collection of related processes each having the same process group IDA unique identifier that represents aprocess groupduring its wordAwordthat has a special meaning to the shell. Most reserved words introduceshell flow control constructs, such 2: Definitions4return statusA synonym forexit mechanism by which a process may be notified by the kernel of an eventoccurring in the builtinA shell builtin command that has been classified as special by sequence of characters considered a single unit by the shell. It is either awordor sequence of characters treated as a unit by the shell. Words may not Basic Shell FeaturesBash is an acronym for Bourne-Again SHell . The Bourne shell is the traditional Unix shelloriginally written by Stephen Bourne.

9 All of the Bourne shell builtin commands are availablein Bash, The rules for evaluation and quoting are taken from theposixspecification for the standard Unix chapter briefly summarizes the shell s building blocks : commands, control struc-tures, shell functions, shellparameters, shell expansions,redirections, which are a way todirect input and output from and to named files, and how the shell executes Shell SyntaxWhen the shell reads input, it proceeds through a sequence of operations. If the inputindicates the beginning of a comment, the shell ignores the comment symbol ( # ), and therest of that , roughly speaking, the shell reads its input and divides the input into wordsand operators, employing the quoting rules to select which meanings to assign various wordsand shell then parses these tokens into commands and other constructs, removes thespecial meaning of certain words or characters, expands others, redirects input and outputas needed, executes the specified command, waits for the command s exit status, and makesthat exit status available for further inspection or Shell OperationThe following is a brief description of the shell s operation when it reads and executes acommand.

10 Basically, the shell does the following:1. Reads its input from a file (seeSection [Shell Scripts], page 42), from a stringsupplied as an argument to the-cinvocation option (seeSection [Invoking Bash],page 85), or from the user s Breaks the input into words and operators, obeying the quoting rules described inSection [Quoting], page 6. These tokens are separated bymetacharacters. Aliasexpansion is performed by this step (seeSection [Aliases], page 93).3. Parses the tokens into simple and compound commands (seeSection [Shell Com-mands], page 8).4. Performs the various shell expansions (seeSection [Shell Expansions], page 22),breaking the expanded tokens into lists of filenames (seeSection [Filename Ex-pansion], page 32) and commands and Performs any necessary redirections (seeSection [Redirections], page 34) and re-moves the redirection operators and their operands from the argument Executes the command (seeSection [Executing Commands], page 38).


Related search queries