SLAVE_NAMES=$(cat "$HADOOP_HOME/etc/hadoop/slaves" | sed 's/#.*$//;/^$/d'); #echo $SLAVE_NAMES for s in $SLAVE_NAMES do echo $s ssh hadoop@$s "cd /opt/software/hadoop/share/hadoop/mapreduce; rm -rfv mapreduce; ls ./" done