Korn shell evaluation

liunx

Guest
Ok, this one is driving me crazy, because I swear I've done this before & I can't find squat on google. Maybe I'm not feeding google what it wants.<br /><br />So, say I need to use sudo to ssh off the box. However, within the commands I need to run on the target box, I will have a variable. Once the sudo ssh is on that box, the variable will no longer exist, so how can I evaluate the variable prior to ssh connection with that box?<br /><br />sudo -u user ssh ${targetbox} -l user 'command | grep ${args}' 2>/dev/null<br /><br />...will return "not enough args for grep", however if I echo the line, I get what I'm looking for. So therefor, the variable ${args} doesn't exist once I'm ssh connected to ${targetbox}.<br /><br />***************Never mind**************** <br /><br />It's an issue with using double quotes instead of single.<br /><br /><span class='edit'>This post has been edited by <b>no2pencil</b>: 13 Jun, 2007 - 12:13 PM</span>
</div>
 
Top