All pastes #940614 Raw Edit

bash script looping?

public shellscript v1 · immutable
·published 2008-03-13 02:56 UTC
rendered paste body
#!/bin/bashfor VHFILE in *do    if sed 's/68\.12\.54\.142/65.43.123.23/g' "$VHFILE" > temp.txt \       && cat temp.txt >> "$VHFILE" \       && rm -f temp.txt \    then        echo "Done with \"$VHFILE\"."    else        echo "Failure at \"$VHFILE\"."    fidone