I have a issue with for loop. Will brief it out for you.
$ for i in `cat serverss`;do ssh -q $i sudo echo "a b c" > /tcb/files/auth/x/xyz;done
ksh: /tcb/files/auth/x/xyz: cannot create
I am getting above error whenever i try to create or modify a file. serverss is the file file which has list of servers.We have sudo to root on those systems.
The problem is when i run echo "a b c" > /tcb/files/auth/x/xyz
on individual servers it runs perfectly. What is the issue in my for loop which throws me the above error.