Open Source Desktop Environment : BashVariables

HomePage :: Categories :: PageIndex :: RecentChanges
Search this site: OSDE.INFO is produced by "osde8info" :

Bash $0 & $-

$ echo $0
bash
$ echo $-
himBH
$ bash -h ; echo $-
imBH
$ set -h ; echo $-
imBH


Bash $* $#

$ set - $(ls -l) ; echo $1 \| $2 \| $3
$ set -- $(ls -l) ; echo $1 \| $2 \| $3
$ set - ls -l ; eval $1 $2

$ set - $(ls) ; echo $*
$ set - $(ls) ; echo $#


Bash ENV

ASD=asd env
env -i env
env -i ASD=asd env
env -u HOME -u LOGNAME env


Bash Keyboard Control Keys

^HOME ^A ESCb ^b . ^f ESCf ^E ^END
	^U[<-erase] . ^K[ill->]
		^L[refresh]


Bash Prompts

$ set | grep PS
GROUPS=()
PS1='[\u@\h \W]\$ '
PS2='> '
PS4='+ '

$ set | grep PROM
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME\%\%.*}:${PWD/#$HOME/~}\007"'


Bash History

$ !!:p
$ !<<number>>:p
$ !<<string>>:p
$ !?string?:p
$ ls !$
$ ls !*
$ !100:gs/x/y/:p
$ ^x^y


STDIN STDOUT STDERR

STDOUT > STDERR
ls zzz 1>&2 

STDERR > STDOUT
ls zzz 2>&1

STDOUT > null STDERR > STDOUT
ls zzz > /dev/null 2>&1

STDOUT & STDERR > null
ls zzz &> /dev/null

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0187 seconds