(no subject)

From: Christopher Buckley (cpmb_at_shaw.ca)
Date: 02/22/05

  • Next message: Jaldhar H. Vyas: "RE: Webmin access denied problem"
    Date: Tue, 22 Feb 2005 11:41:37 -0800
    To: debian-user@lists.debian.org
    
    

    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

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Jaldhar H. Vyas: "RE: Webmin access denied problem"