Hello,
i`m tryeing to execute loop on remote server and i have problems with syntax
my command is
ssh root@server "for i in /vz/private/*; do b=`ls -la $i/usr/bin/crontab | awk '{print $1}'`; echo $b; done"
with this command i`m tryeing to get all permissions of file /usr/bin/crontab
this file can be found in any subdirectory of directoryes in this folder /vz/private/
when i execute that command in remote server it works fine, but when i try to send loop via ssh to that remote server then i`m getting empty values
---------- Post updated at 04:33 AM ---------- Previous update was at 04:25 AM ----------
dont need it any more, i got it working with command:
ssh root@server "for i in /vz/private/*; do ls -la $i/usr/bin/crontab | awk '{print $1}'; done"