[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[no subject]



Package: Bash
Version: 2.03.0(1)


I realize there is a newer version of bash available but I've been playing
with an old version for specific reasons. I suspect these are not version
problems but are user problems. None the less, I'm not sure if these are
bugs or not



I've been having problems with bash set, alias, and pattern matching.

First, I can't seem to figure out how to get these commands to work using
immediate strings


root@server# PATH=${PATH//"anypath"/"replacement"}

OR

root@server# PATH=${PATH//'anypath'/'replacement'}





However the following does work...but not what I want to use

root@server# pat="anypath"
root@server# rpl="replacement"
root@server# PATH=${PATH//$pat/$rpl}





Next I tried this

root@server# alias t='echo test results = $@'
root@server# t one two three
test results = one two three





But then

root@server# set pat="anypath"
root@server# t one two three
testresults = pat=anypath one two three

root@server# unset pat
root@server# t one two three
testresults = pat=anypath one two three


Why is my last set command appearing as an argument???
It seems to me it should NOT be inserting the last set command.
How do I prevent this? I notice that logging out resets this behaviour.





Finally, this doesn't appear to work either

root@server# alias t='echo test results = $@ and thats it'
root@server# t one two three
testresults = and thats it one two three


Why aren't the arguments appearing before the "and thats it" as they
"should"?



Thanks for the help,
Christopher Buckley







Reply to: