Dang, this is a lot of cool stuff. I've used xargs whenever I needed too, but never delved that deeply into it. This workflow is really nice.
@tompov2273 жыл бұрын
episode 200!! super cool i really like these. also what a great topic for #200 i LOVE xargs
@example1013 жыл бұрын
xargs is indeed the Linux key to doing many bits of automation. Great code coaching.
@sadhlife3 жыл бұрын
ok this was pretty cool. I just started looking into bash scripting, and I'm definitely going to look into find and xargs (and git) a lot more
@elimik312 жыл бұрын
And here I was using $() subprocess substitution like a pleb, e.g. something like `echo $(ls)` or `for file in $(ls)`. xarrgs seems like the better option for most of those cases and I'll be happy to use it from now on :)
@armpitpuncher3 жыл бұрын
Note that the '-1' is unnecessary for ls. ls detects whether its output is going to a terminal, or if it's being piped to another program. If it's being piped to another program, like xargs, it only outputs one entry per line. So the command "ls -1 | xargs -d' ' --verbose -n1" does the same thing even if you remove the '-1'.
@anthonywritescode3 жыл бұрын
this depends on the implementation and version of `ls` -- not all implementations behave in that way
@shashanksharma213 жыл бұрын
Another gem of a video ! Thanks !
@md_daud Жыл бұрын
thank you!
@theeFaris2 жыл бұрын
Didn't agree more, find + xargs is the way to go, for long commands i usually add a tqdm at the end too.
@Maverick_Mad_Moiselle7 ай бұрын
What part of the quoting you "didn't do properly"? I keep re-reading it, but I don't understand why it manages to rename 'hello hello world' into a bak file and then tries to move a world file...
@anthonywritescode7 ай бұрын
spaces in filenames got interpreted as argument separators. quoting properly prevents that
@cubernetes Жыл бұрын
5:29 how did you jump from EOL to that position (position before 'hello') so quickly?
@anthonywritescode Жыл бұрын
probably Ctrl+e
@mister_incredible3469 Жыл бұрын
i still didn't get it 😥. i am very new to linux
@walkdead94 Жыл бұрын
learning xargs because I can't learn how to use variables on scripting.. hahahaha