Home » mariadb on ubuntu » UNIX/LINUX Command – bash

UNIX/LINUX Command – bash


bash—GNU Bourne–again shell


bash [options] [file]


bash is an sh–compatible command language interpreter that executes commands read from the standard input or from a file. bash also incorporates useful features from the Korn and C shells (ksh and csh).

bash is ultimately intended to be a conformant implementation of the IEEE POSIX Shell and Tools specification (IEEE Working Group 10032).


In addition to the single–character shell options documented in the description of the set built-in command, bash interprets the following flags when it is invoked:

Options Description
–c string If the –c flag is present, then commands are read from string. If there are arguments after the string, they are assigned to the positional parameters, starting with $0.
–i If the –i flag is present, the shell is interactive.
–s If the –s flag is present, or if no arguments remain after option processing, then commands are read from the standard input. This option allows the positional parameters to be set when invoking an interactive shell.
A single – signals the end of options and disables further option processing. Any arguments after the – are treated as filenames and arguments. An argument of — is equivalent to an argument of –.

bash also interprets a number of multicharacter options. To be recognized, these options must appear on the command line before the single–character options.

Options Description
–norc Do not read and execute the personal initialization file ˜/.bashrc if the shell is interactive. This option is on by default if the shell is invoked as sh.
–noprofile Do not read either the system–wide startup file /etc/profile or any of the personal initialization files ˜/.bash_profile, ˜/.bash_login, or ˜/.profile. By default, bash normally reads these files when it is invoked as a login shell. (See the “Invocation” section, later in this manual page.)
–rcfile file Execute commands from file instead of the standard personal initialization file ˜/.bashrc, if the shell is interactive. (See “Invocation.”)
–version Show the version number of this instance of bash when starting.
–quiet Do not be verbose when starting up (do not show the shell version or any other information). This is the default.
–login Make bash act as if it had been invoked as a login shell.
–nobraceexpansion Do not perform curly brace expansion. (See “Brace Expansion,” later in this manual page.)
–nolineediting Do not use the GNU readline library to read command lines if interactive.
–posix Change the behavior of bash where the default operation differs from the POSIX 1003.2 standard to match the standard.

Related Posts

UNIX/LINUX Command – rsync

UNIX/LINUX Command – rsync

NAME rsync – a fast, versatile, remote (and local) file-copying tool rsync Command SYNOPSIS Local: rsync [OPTION…] SRC… [DEST] Access via remote shell:Pull: rsync [OPTION…] [[email protected]]HOST:SRC… [DEST]Push: rsync [OPTION…] SRC… [[email protected]]HOST:DEST Access via rsync...

UNIX/LINUX Command – strip

UNIX/LINUX Command – strip

NAME strip—Discard symbols from object files. SYNOPSIS strip [ -Fbfdname|–target=bfdname ] [ -Ibfdname|–input-target=bfdname ] [ -Obfdname|–output-target=bfdname ] [-Rsectionname|–remove-section=sectionname ] [ -s|–strip-all ] [-S|-g|–strip-debug ][-x|–discard-all...

UNIX/LINUX Command – expand

UNIX/LINUX Command – expand

NAME expand—Convert tabs to spaces SYNOPSIS expand [–tab1[,tab2[,…]]] [–t tab1[,tab2[,…]]] [–i] [—tabs=tab1[,tab2[,…]]] [–initial] [–help] [–version] [file…] DESCRIPTION This manual page documents the GNU version of expand. expand writes the contents of each given...

UNIX/LINUX Command – uuencode

UNIX/LINUX Command – uuencode

NAME uuencode—Encode a binary fileuudecode—Decode a file created by uuencode SYNOPSIS uuencode [-m] [ file ] nameuudecode [-o outfile] [ file ]… DESCRIPTION uuencode and uudecode are used to transmit binary files over transmission mediums that do not support other...

Follow Us

Our Communities

The Ultimate Managed Hosting Platform
Load WordPress Sites in as fast as 37ms!



Submit a Comment

Your email address will not be published.

10 − seven =