`cat package.json | grep name`
branch = `git branch --show-current`
`dep deploy --branch=#{branch}` if $?.success?
[
"sleep 1; echo 1",
"sleep 2; echo 2",
"sleep 3; echo 3",
].map { |cmd| Thread.new { %x(cmd) } }.each(&:join)
name = 'foo bar'
`mkdir /tmp/#{name}` if $?.success?Zx 3.0
21–30 of 169 posts
Re: Zx 3.0
#22Re: Zx 3.0
#23I feel like the await keyword everywhere is a bit verbose. One might use something like the gpp preprocessor (hopefully the macros could be defined in a separate file): #!/usr/bin/env zx #define _ await $ #define __ await Promise.all #define _1 process.argv[1] #define _2 process.argv[1] #define _3 process.argv[1] _`cat package.json | grep name` let branch = _`git branch --show-current` _`dep deploy --branch=${branch}…
I don't think it is very relevant to critique the Javascript syntax on a post about a specific library
Re: Zx 3.0
#24What does "DX" stand for in "tons of DX improvements"?
Re: Zx 3.0
#25Re: Zx 3.0
#26Re: Zx 3.0
#27Earlier quoted context omitted.
Wow, plumbum, despite it's unfortunate name, looks awesome. I will definitely try it next time I write a script.
how is the name unfortunate? from the site: > Plumbum (Latin for lead, which was used to create pipes back in the day)
Re: Zx 3.0
#28I'm having a hard time believing that Google uses this much internally. Is github.com/google just a place where Googlers can put personal projects to get additional exposure?
Re: Zx 3.0
#29I'm having a hard time believing that Google uses this much internally. Is github.com/google just a place where Googlers can put personal projects to get additional exposure?
Re: Zx 3.0
#30Zx is good if JavaScript is only language you know. If you have ability to program or learn other programming languages, Python with packages like Shell and Plumbum might be better choices for shell scripting tasks that outgrow shell. - Python code with Shell is easier to read ana write - No nees to carry async/await keywords thru the code - Powerful plain text manipulation in the stdlib https://pypi.org/project/pyth…
> Python code with Shell is easier to read and write That is pretty subjective