Sorry about the strange title, but it's the only way I could think of phrasing it.
I need to remotely fire this command to a server:
sar -f `ls -1rt /var/adm/sa/sa?? | tail -2 | head -1`
Now if I run this command on the server itself it work fine.
However, if I try to run it as:
ssh serverx "sar -f `ls -1rt /var/adm/sa/sa?? | tail -2 | head -1`"
As far as I can tell it's using the "tweeters" that fails (these things "`") I've tried using a backslash to show that they are system characters, but it still doesn't work.
I'm sure it'll be something really simple to fix it, but I've been sitting trying everything I can think of to no avail.
Thanks in advance.