3 ms·> for f in *.txt; do sed 's/i/n/g' "$f" >"$f".tmp && cat "$f".tmp >"$f"; done $f = $f.tmp in this case.by 6LLvveMx2koXfwn 5y ago> for f in *.txt; do sed 's/i/n/g' "$f" >"$f".tmp && cat "$f".tmp >"$f"; done $f = $f.tmp in this case.