Sunday, May 29, 2005

Learning the Bash shell

Got my hands on the third edition of this book...
Really good.
So for sometime my glob would include stuff i try out reading this book..

So here is something on aliases and options (set -o)

$set -o ignoreeof
'if you type ctrl-d now'
$Use "logout" to leave the shell.
$set -o noclobber
$echo hi > temp.txt
$cat temp.txt
hi
$echo sddsshi > temp.txt
-bash: temp.txt: cannot overwrite existing file
$echo sddsshi > temp.txt
-bash: temp.txt: cannot overwrite existing file
$echo sddsshi > temp.txt
-bash: temp.txt: cannot overwrite existing file
$rm temp.txt
$set -o noglob
$ls *
ls: *: No such file or directory
$set -o ignoreeof
$set -o nounset
$ls $ASD
-bash: ASD: unbound variable
$cd mybash
-bash: cd: mybash: No such file or directory
$alias
alias links='links -http-proxy rio:8088'
$alias mybash=/home/kalyan/fun/bash/
$cd mybash
-bash: cd: mybash: No such file or directory
$alias cd='cd '
$cd mybash
$pwd
/home/kalyan/fun/bash

0 Comments:

Post a Comment

<< Home