I tried it again, the temp. file is available now:
#!/bin/zsh
setopt aliases
source /etc/profile; source /etc/zprofile; source /etc/zshrc; source /Users/monte/.zprofile; source /Users/monte/.zshenv;
cd '/Users/monte/Desktop/'
xargs -0 -J {} env <
The debug log is the same as previous:
[12:09:48.949] Logging Started...
[12:10:11.789] RunCommand[Keyword] Processing complete
[12:10:11.790] RunCommand[Keyword] Passing output 'env' to Run Script
[12:10:12.060] ERROR: RunCommand[Run Script] /var/folders/ld/9n2t22k93hvgg3_kk6yl2mbw0000gn/T/tmp.16WmCNXD:6: parse error near `\n'
[12:10:12.066] RunCommand[Run Script] Processing complete
[12:10:12.067] RunCommand[Run Script] Passing output '' to Large Type
The command I issued:
> env<cmd+Enter>
I run the 'xargs -0 -J {} env <' command generated by your workflow directly in shell; similar error occurred ("parse error near '\n'").
If I omitted the '<' , xargs waited for my input to continue:
==> If I then input "me=monte", the environment was echoed with 'me=monte' appended as the last line.
==> If I instead just press 'C-d' without input anything, nothing was printed.
I also tested the above in my MacPro (10.14, bash) and got same result.
I also tested the above in a Ubuntu Linux 18.4 VM (in Parallel Desktop); similar error and results.
Then, I tried adding ';' after the '{}' argument:
xargs -0 -J {}; env
xargs waited for my input.
==> I just press 'C-d' without input anything, environment is echoed as expected.
It seems xargs doesn't accept '<' redirection.
And I wonder why you need to indiscriminately pass user input to xargs? Isn't it up to user to determine if xargs processing is needed?
I believe if your generated command was just 'env' than we'll get expected result.
If for some reasons you think xargs is necessary, wouldn't the generated command 'env | xargs -0 -J {}' be more sensible?
Thanks your help.