37 lines
1.8 KiB
HTML
37 lines
1.8 KiB
HTML
|
---
|
||
|
layout: page
|
||
|
category_title: Intermediate commands
|
||
|
category-page: intermediate
|
||
|
tags: bash shell terminal
|
||
|
author: Marco Farace
|
||
|
title: bash
|
||
|
---
|
||
|
|
||
|
<p>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 intended to be a
|
||
|
conformant implementation of the Shell and Utilities portion of the IEEE POSIX
|
||
|
specification (IEEE Standard 1003.1).</p>
|
||
|
|
||
|
<h3> Flags </h3>
|
||
|
<ul>
|
||
|
<li>-c: If this option 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.</li>
|
||
|
<li>-i: If this option is present, the shell is interactive.</li>
|
||
|
<li>-l: Make bash act as if it had been invoked as a login shell</li>
|
||
|
<li>-r: If this option is present, the shell becomes restricted</li>
|
||
|
<li>-s: If this 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.</li>
|
||
|
<li>-s: List only the name, line and time fields. This is the default.</li>
|
||
|
<li>-T: Print a character after the user name indicating the state of the
|
||
|
terminal line: `+' if the terminal is writable; `-' if it is not;
|
||
|
and `?' if a bad line is encountered.</li>
|
||
|
<li>-u: Print the idle time for each user, and the associated process ID.</li>
|
||
|
<li>am I: Returns the invoker's real user name.</li>
|
||
|
<li>file: By default, who gathers information from the file /var/run/utmpx.
|
||
|
An alternative file may be specified.</li>
|
||
|
</ul>
|