24.07.2018 Views

Bash-Beginners-Guide

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

export var export VAR=value<br />

${nnnn}<br />

export<br />

var=val<br />

${nn}<br />

"$@" "$@" "$@"<br />

setenv var<br />

val<br />

$# $# $# $#argv<br />

$? $? $? $status<br />

$! $! $!<br />

Set environment<br />

variable<br />

More than 9<br />

arguments can<br />

be referenced<br />

All arguments as<br />

separate words<br />

Number of<br />

arguments<br />

Exit status of the<br />

most recently<br />

executed<br />

command<br />

PID of most<br />

recently<br />

backgrounded<br />

process<br />

$- $- $- Current options<br />

. file source file or . file . file source file<br />

alias x='y' alias x=y alias x y<br />

case case case<br />

done done done end<br />

switch or<br />

case<br />

esac esac esac endsw<br />

Read commands<br />

in file<br />

Name x stands<br />

for command y<br />

Choose<br />

alternatives<br />

End a loop<br />

statement<br />

End case or<br />

switch<br />

exit n exit n exit n exit (expr) Exit with a status<br />

for/do for/do for/do foreach<br />

set -f, set -o<br />

nullglob|dotglob|nocaseglob|noglob<br />

noglob<br />

hash hash alias -t hashstat<br />

hash cmds hash cmds<br />

<strong>Bash</strong> <strong>Guide</strong> for <strong>Beginners</strong><br />

alias -t<br />

cmds<br />

rehash<br />

hash -r hash -r unhash<br />

history history history<br />

Loop through<br />

variables<br />

Ignore<br />

substitution<br />

characters for<br />

filename<br />

generation<br />

Display hashed<br />

commands<br />

(tracked aliases)<br />

Remember<br />

command<br />

locations<br />

Forget command<br />

locations<br />

List previous<br />

commands<br />

Appendix A. Shell Features 144

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!