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