Some scripts can't be directly converted by string replacement. A good example is a for loop:
for value in 1 2 3 4; do
echo "$value"
done
This gets converted to for value in 1 2 3 4; do; echo "$value"; done, causing:
ash: syntax error: unexpected ";"
The extra ; after the do is the source of this particular error.
It seems that simply passing in the script unchanged works fine; what's the intent behind modifying the input run value instead of passing it in with the newlines intact?
Some scripts can't be directly converted by string replacement. A good example is a for loop:
This gets converted to
for value in 1 2 3 4; do; echo "$value"; done
, causing:The extra
;
after thedo
is the source of this particular error.It seems that simply passing in the script unchanged works fine; what's the intent behind modifying the input
run
value instead of passing it in with the newlines intact?