I'm trying to execute commands on a remote host from a perl script.
$check = `rsh host1 "df -k /backup/|tail -1|awk \'{print \$5}\'"`;
print $check
But awk returns me the whole string instead of one column.
/dev/md/dsk/d10 4133838 1936684 2155816 48% /
I need only
48%
Looks like there is an issue in escaping but don't know what exactly wrong. Please help.