Bash - Bash cli

Bash Liste Des Attaques Ovh

About

Bash is an sh-compatible a shell that executes commands read:

With docker, you can have a bash easily on unbutu with the following command

docker run -t -i ubuntu /bin/bash

Syntax

bash [multiple character options] [single character options] [arguments]

Single character Options

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

Options Short Description Long Description
Command
-c string String Command commands are read from string. If there are arguments after the string, they are assigned to the positional parameters, starting with 0.
-s Standard Input Command If the -s option 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.
Others
-i Interactive shell
-l Login Shell
-r Restricted
-D A list of all double-quoted strings preceded by $ is printed on the standard output. These are the strings that are subject to language translation when the current locale is not C or POSIX. This implies the -n option; no commands will be executed.
[-+]O [shopt_option] shopt invocation shopt_option is one of the shell options accepted by the shopt builtin command. -O sets the value of that option; +O unsets it.
End of options processing disables further option processing and treat further arguments as file names and arguments. An argument of - is equivalent to –.

Multi-character Options

The multi-character options must appear on the command line before the single-character options to be recognized.

Options Short Description Long Description
–debugger Arrange for the debugger profile to be executed before the shell starts. Turns on extended debugging mode (see the description of the extdebug option to the shopt builtin below) and shell function tracing (see the description of the -o functrace option to the set builtin below).
–dump-po-strings Equivalent to -D with gettext po (portable object) Equivalent to -D, but the output is in the GNU gettext po (portable object) file format.
–dump-strings Equivalent to -D
–help Help Display a usage message on standard output and exit successfully.
–init-file file
–rcfile file Execute commands from file instead of the standard personal initialization file ~/.bashrc if the shell is interactive
–login Equivalent to -l
–noediting Do not use the GNU readline library Do not use the GNU readline library to read command lines when the shell is interactive.
–noprofile no startup script 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 reads these files when it is invoked as a login shell
–norc no personal initialization file 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.
–posix posix beahviour Change the behavior of bash where the default operation differs from the POSIX standard to match the standard (posix mode).
–restricted Restricted shell The shell becomes restricted
–rpm-requires List of required rpm files This files are required for the shell script to run.
–verbose Equivalent to -v
–version Version

Arguments

File

If arguments remain after option processing, and neither the -c nor the -s option has been supplied, the first argument is assumed to be the name of a file containing shell commands.

If bash is invoked in this fashion, 0 is set to the name of the file, and the positional parameters are set to the remaining arguments. Bash reads and executes commands from this file, then exits.

An attempt is first made to open the file in the current directory, and, if no file is found, then the shell searches the directories in PATH for the script.





Discover More
Bash Liste Des Attaques Ovh
Bash - Brace Expansion {} (Data Generation)

Brace expansion is a mechanism by which arbitrary strings may be generated. This mechanism is similar to pathname expansion, but the filenames generated need not exist. Patterns to be brace expanded...
Bash Liste Des Attaques Ovh
Bash - (Argument|Positional Parameter)

An argument is a parameter given: to a command to a function or to the bash shell They are referenced by position. A positional parameter is a parameter denoted: by one or more digits, ...
Bash Liste Des Attaques Ovh
Bash - (Builtin|Intern|System|Reserved|Shell) variable name

Reserved variable name are named that have a special meaning for the bash shell. PS1 defines the shell's command-line prompt. HOME defines the home directory for a user. PATH defines a list...
Bash Liste Des Attaques Ovh
Bash - Boolean Variable

The Boolean data type in Bash. Bash has a true built-in. See
Bash Liste Des Attaques Ovh
Bash - Builtin Commands

builtin refers to: a builtin command. See or to the specific builtin command. See (useful when defining a function whose name is the same as a shell builtin) The builtin command execute the specified...
Bash Liste Des Attaques Ovh
Bash - Expression

An expression is a string that is understood by bash.
Bash Liste Des Attaques Ovh
Bash - How to pass arguments that have space in their values ?

This article shows you how to pass arguments that have space characters in their values. Passing several arguments to a function that are stored as a string may not work properly when you have space...
Bash Liste Des Attaques Ovh
Bash - Interactive Shell

An interactive shell is when bash is: started: without non-optionarguments without the -c option whose standard input and error are both connected to terminals (as determined by isatty(3)),...
Bash Liste Des Attaques Ovh
Bash - Shell Option (Shopt)

Shell option are the option of the shell Shell option can be specified upon invocation, by: the set builtin command, or those set by the shell itself (such as the -i option). The special...
Bash Liste Des Attaques Ovh
Bash - Standard input (stdin)

operations that applied only to the bash|bash shell See The input redirection operator takes the content of a file and send it as standard input Example with read that take a stand Create...



Share this page:
Follow us:
Task Runner