Hello Everybody,
I'm facing a weird problem with the awk command.
I try to retrieve in a variable the value returned by a simple ls command.
ls /export/home/tmp |tail -1 return a good value (the name of the .
But When I try to execute the same command in a remote server using ssh as follows:
ssh root@192.168.1.20 "TERM=xterm; export TERM; VAR=`ls /export/home/tmp |tail -1`; echo $VAR"
I have the following error message:
ls: cannot access /export/home/tmp: No such file or directory
Could someone help me to resolve this problem by storing the retuned valu in a variable.
Thanx a lot!!