CLI fully compatible with Linux shell? #731
Answered
by
antonmedv
TonyGravagno
asked this question in
General
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
TonyGravagno
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is anyone using zx with full shell integration in daily DevOPs? Example:
df -k | ~/check_files.mjs | grep "foo" | ~/list.mjs
I'm wondering if a shebang eliminates the need for
| zx ~/do_this.mjs |
?If we use zx twice in a command like that, what kind of startup costs are involved? I'd like to understand how much of a performance hit we take with JS vs BASH, and where we'd lose performance with repeated usage in a single piped chain as above.
Would there be any less of a hit if the above command were itself wrapped in a script that is executed by zx?
zx check_and_list.mjs
which includesawait ${piped_shell_commands}
.I've read that without zx, people are using Node by running
npm init
to create a package.json and then adding the package folder to their path. Without testing, I think that would significantly clutter the PATH/environment. Is there an elegant pattern to creating a lot of .mjs scripts and locating them under something like a "admin_scripts" folder with a simple PATH (glob?) so thatfoo.mjs
orzx foo.mjs
will quickly find all such scripts?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions