Double quotas problem

From: Antimo (antimogc_at_hotmail.com)
Date: 06/15/04

  • Next message: UnixHelp: "How to Freeze (Archive) A Unix App Server"
    Date: 15 Jun 2004 09:20:12 -0700
    
    

    I all,
    I'm writing a script on a solaris machine (sh shell), and I need to
    put the following command containing double quotas:
            xmodmap -e "keysym KP_1 = 1"
    as one of the commands of the remote shell (to map the numeric pad on
    the remote machine).

    It should be something in this way:
    rsh remote_hostname "ls; pwd; xmodmap -e "keysym KP_1 = 1"; ls; pwd"
    (the ls and pwd are written to give example of a sequence of
    commands).

    The problem is that the previous line doesn't work, because I have to
    insert the double quotas inside the double quotas of the rsh. In
    addition I can't run a script on the remote machine containing the
    xmodmap command.
    Anyone knows how to write it in the correct way? I have also tested
    the following lines (without success):
    rsh remote_hostname "ls; pwd; xmodmap -e \"keysym KP_1 = 1\"; ls; pwd"
    rsh remote_hostname "(ls; pwd; (xmodmap -e \"keysym KP_1 = 1\"); ls;
    pwd)"

    Thank you for the help,
    Paolo


  • Next message: UnixHelp: "How to Freeze (Archive) A Unix App Server"

    Relevant Pages

    • Re: shell scripting
      ... and am assuming an sh-compatible shell here.... ... command 1 options arguments ... To run the script, do: ... then you need to use the full path to execute it: ...
      (comp.unix.questions)
    • Re: shell scripting
      ... and am assuming an sh-compatible shell here.... ... command 1 options arguments ... To run the script, do: ... then you need to use the full path to execute it: ...
      (comp.unix.shell)
    • Re: cd.exe
      ... hopefully will use the value of SHELL to invode the command. ... sets up the build environment and invokes bash. ... The script translates ... when invoked from the script though works fine from the command line. ...
      (comp.os.os2.programmer.porting)
    • Re: [ Attn: Randy ] Ad-hoc Parsing?
      ... I can write and compile ... >>programs inside a shell, ... But for me it is essential, that the script ... > internal command), the this script can be executed even if there ...
      (alt.lang.asm)
    • Re: Script to extract portions of text from a text file
      ... > But your example is not comparing the same command. ... it wouldn't be sent to the shell until you press enter). ... >> behaves differently in a script and at the prompt ... While awk does: ...
      (comp.unix.shell)