95b6720f2e
git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@238 a672b425-5310-4d7a-af5c-997e18724b81
38 lines
1.6 KiB
HTML
38 lines
1.6 KiB
HTML
---
|
|
layout: page
|
|
category-page: intermediate
|
|
category-title: Intermediate commands
|
|
tags: bash shell terminal
|
|
author: Marco Farace
|
|
title: bash
|
|
---
|
|
|
|
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).<br>
|
|
|
|
<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>
|