|
|||||||||||
|
& being parsed in command argument
From: Stephen Lawrence Jr. <slawrence(at)ucdavis.edu>
Date: Wed May 21 2003 - 16:15:29 EDT
The bash script I have does the following:
$@ may be set to something like this: "RP_HEADER='Acnt GH&002, period 08, and fiscial year 2001'" then:
cmdline='source /etc/profile;cd
2) It then calls ssh, passing it a host and $cmdline arguemt: ex. This method normally works fine, but every once in a while, the $@ variable comes with an "&" in it (like the example above), and as it is being passed to ssh, the script errors out before it gets to the remote host because it is capturing the & as a bash signal to background. Does anyone have any ideas on what I could do to fix this? Is is a quoting issue with the script? -- Stephen Lawrence Jr. - Programmer II slawrence@ucdavis.edu California Animal Health & Food Safety Laboratory System, UC Davis (530)-752-4614Received on Wed May 21 19:22:14 2003 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:59 EDT |
||||||||||
|
|||||||||||