#!/bin/bash for VHFILE in * do cp $VHFILE temp.txt sed 's/68.12.54.142/65.43.123.23/g' temp.txt >> $VHFILE echo "Done with " $VHFILE rm -f temp.txt done ######################## #!/bin/bash for VHFILE in * do cp "$VHFILE" temp.txt sed 's/68.12.54.142/65.43.123.23/g' temp.txt >> "$VHFILE" echo "Done with " "$VHFILE" rm -f temp.txt done