WaZaRWiki : BashTips

GaelReignier :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register :: Hosted by: eNiX

Revision [254]

This is an old revision of BashTips made by GaelReignier on 2008-12-18 14:31:36.
Exit status: http://tldp.org/LDP/abs/html/exit-status.html
0 is good and you can retrieve the last exit status using echo $?

#!/bin/sh
# this is a comment
echo "The number of arguments is $#"
echo "The arguments are $*"
echo "The first is $1"
echo "My process number is $$"
echo "Enter a number from the keyboard: "
read number
echo "The number you entered was $number"


Debug mode:
on: set -x
off: set +x



ctrl+s will lock the term
ctrl+q will unlock the term

My .bash_profile for the prompt line
# set prompt: ``username@hostname time :/directory $ ''
PS1="[\u@\h \[\033[00;36m\]\t\[\033[00m\] :\[\033[01;37m\]\w\[\033[00m\]]"
case `id -u` in
      0) PS1="${PS1}# ";;
      *) PS1="${PS1}$ ";;
esac


Having a pretty bash: http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html

Non executed bash:
[gael@unennennium 12:38:53 :01;37m~/Documents/Lonres/Documentation/PHP]$

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

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