The below "for" loop works locally on the same server.
But when triggered through "ssh" protocol on remote servers, the output is not received.
Please, can anyone suggest how to make it work while to be triggered on remote servers.
for i in $(cat Server_List) # Works
do # Works
echo $i # Works
ssh $i '$(for a in `/usr/sbin/lspath|grep scsi|awk '{print \$2}'|sort|uniq`; # Doesn't Work
do # Doesn't Work
echo "\$a `/usr/sbin/lspath |awk '/'\$a' /' |uniq|awk '/Enabled/'|wc -l`;done)' # Doesn't Work
done # Works