Re: Sending variables via rsh which contains "$"

From: Sunder Iyengar (sunder_iyengar_at_SYMANTEC.COM)
Date: 08/17/05

  • Next message: Green, Simon: "Re: Sending variables via rsh which contains "$""
    Date:         Wed, 17 Aug 2005 12:00:44 +1000
    To: aix-l@Princeton.EDU
    
    

    How about -
     
    # rsh server2 echo 'test*\$89'
     
    Sunder.
     

      _____

    From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On Behalf Of Alberto Cozer
    Sent: Wednesday, 17 August 2005 9:50 AM
    To: aix-l@Princeton.EDU
    Subject: Sending variables via rsh which contains "$"

    Hello Everybody,
     
    Does anybody knows how to make a shellscript pass a variable which contains "$" followed by a number, without having it changed to null?
     
    Example:
     
    1) root@server1:/usr/local/bin/ # echo test*$89
        test*9

    2) root@server1:/usr/local/bin/ # echo 'test*$89'
        test*$89

    3) root@server1:/usr/local/bin/ # rsh server2 echo test*$89
        test*9

    4) root@server1:/usr/local/bin/ # rsh server2 echo 'test*$89'
        test*9
     
    Command #4 doesn't work as expected and always converts the $8 to null. Already tryed changing the ' ' to \' \' as well as a lot of other weird combinations with ', ´, `, and ", without success. Any help will be highly appreciated.
     
    Thanks a bunch,
    Alberto.
     
    ======================================
    Alberto Cozer
    Systems Security Egineer
    Check Point Certified Security Expert, CCSE NG
    IBM Certified AIX Specialist
     


  • Next message: Green, Simon: "Re: Sending variables via rsh which contains "$""