--> n_i
Can we use rah to a specific node ? The reason why I am using ssh instead of rah is because, after doing ssh on each node, it generates an output specific to that node
This is what I am trying to do. If the particular file is not readable on that node, the output should say that the file is not readable on that specific node.
If you could suggest me a way how this could be accomplished through rsh, it would be really great.
cat ~/sqllib/db2nodes.cfg | awk '{print $2}'| uniq > nodefile.out
for nodename in `cat nodefile.out`
do ssh $nodename "df -h" | grep -i % | cut -c 22- | awk '{print $5}' | grep -iE 'db2backups|db2containers|db2logs' > filename_output
for filename in `cat filename_output`
do ssh "ls -ld $filename" | awk '{print $1}' | cut -c2 | while read var
if [[ $var -eq r ]]
then echo "$filename on $nodename is readable"
else
echo "$filename on $nodename is not readable"
fi
done
done