repl="$repl2"
echo -n ";s,$(eval echo "\$\{$var\}"),$repl,g" >>"$output.sed"
done
- sed -f "$output.sed" -i "$output.working"
+ sed -f "$output.sed" "$output.working" >"$output.working2"
+ mv -f "$output.working2" "$output.working"
error="$(grep '.*\${[^}]*}.*' "$output.working" | head -n 1)"
if [ -n "$error" ]; then
error="$(echo "$error" | sed 's,.*\${\([^}]*\)}.*,\1,')"
repl="$repl2"
echo -n ";s,$(eval echo "\$\{$var\}"),$repl,g" >>"$output.sed"
done
-sed -f "$output.sed" -i "$output.working"
+sed -f "$output.sed" "$output.working" >"$output.working2"
+mv -f "$output.working2" "$output.working"
error="$(grep '.*\${[^}]*}.*' "$output.working" | head -n 1)"
if [ -n "$error" ]; then
error="$(echo "$error" | sed 's,.*\${\([^}]*\)}.*,\1,')"