I am experimenting with qvm-run
. If am doing something like this:
if <some condition>; then
qvm-run -u user disp4801 "
echo hello
echo hello2
"
fi
, I’ll get
“command failed with code: 2”
Note the indention for the if
statement and the "
at its own line for code style aspects.
I need to change to
if <some condition>; then
qvm-run -u user disp4801 "
echo hello
echo hello2"
fi
("
at end of existing line)
Whereas following works:
qvm-run -u user disp4801 "
echo hello
echo hello2
"
My reference comparison is bash, where indention with "
in new line also works without problems:
bash -c "
echo hello
echo hello2
"
Background: I needed half an hour to find this tricky to debug error in my shell scripts.
What is the reason for qvm-run
complaining?