XIAO Gang wrote: > #! /bin/bash > > if true; then > alias myls=ls > alias -p > myls > fi > > myls
In a script it is considered better form to use shell functions than
to use aliases. Aliases are an old csh feature. Functions generally
provide that functionality in a better fashion.
#!/bin/bash
if true; then
myls() { ls; }
myls
fi
myls
Bob
_______________________________________________
Bug-bash mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-bash
