Provlima alias sto bash
Giorgos Keramidas
keramidi at otenet.gr
Fri Apr 13 05:53:01 EEST 2001
On Fri, Apr 13, 2001 at 01:40:44AM +0300, Vasilis Vasaitis wrote:
>
> Erm, ston bash ta aliases exoun apla ena diko tou* byma sti*
> antikatastasei*, xwri* alla pronomia pera apo auto. Koinw*, den dexontai
> orismata. Styn pragmatikotyta xreiazesai mia sunartysy:
>
> ls()
> {
> command ls "$@"
> echo End of ls
> }
>
> Den pairnw kai orko, alla prepei na douleuei se ola ta sxetika logika
> Bourne shell...
Kati pou paizei me to bash epishs einai:
function cd () {
builtin cd "$@" ;
pwd ;
}
otan h entolh einai shell builtin, h otan einai programma pou kapou sto disko
uparxei to ektelesimo tou:
function ls () {
/bin/ls "$@"
echo End of listing.
}
dhladh na doseis to /full/command/path sto function :)
To an einai shell builtin kapoia entolh, h command, h alias, to leei fusika h
shell builtin `type':
$ type ls
ls is /bin/ls
$ type cd
cd is a shell builtin
Ciao :)
--giorgos
More information about the Linux-greek-users
mailing list