./myscript.sh $(node main.js). Content of
myscript.sh right now:
#!/bin/zsh TEMPFILE=$(mktemp /tmp/atom.XXXX) echo $1 > $TEMPFILE ide --file=$TEMPFILE
I'm running into trouble on the
echo line. The application's output is markup, so it has a variety of whitespace, backticks, (single|double) quotation marks, alphanumeric char, symbols, and newlines in it.
I understand the issues have to do with the backticks and quotation mark species in the app's output. Some dummy output:
# Weightlifting Workout A Bodyweight: 165 | Lift | ||| 1RM (lb) | |---| ---:|---:|---:| :-- | |**Squats**|100x5<br>*0.61xBW*|90x6<br>*0.55xBW*|80x8<br>*0.48xBW*|112.5 | |**Deadlift**|250x2<br>*1.52xBW*|||257.1 |
I imagine the fix is that I need to wrap something around the
I've tried combinations of
./myscript.sh $(node main.js),
./myscript.sh "node main.js",
./myscript.sh "$(node main.js)"
echo $1 > file,
echo $($1) > file, etc.
playing around with passing the app's output as the zsh argument or passing the app's name as the zsh argument and then the zsh script executing the app's name.
Can't figure out how to get this working without running into an error like "command not found: node main.js" or "command not found: #" or something like that.