What is Nostr?
Jens Kutílek /
npub1f58…zg5d
2024-10-13 09:38:13

Jens Kutílek on Nostr: xargs is my favourite recent command line discovery. You can use xargs to avoid ...

xargs is my favourite recent command line discovery. You can use xargs to avoid having to write a loop to call a command on a large number of files. So let's say you want to convert a folder of TTFs to WOFF2. Will shell globbing work?

$ woff2_compress *.ttf
One argument, the input filename, must be provided.

Nope. It must be called with just one file path. With xargs, that's as easy as:

$ ls *.ttf | xargs -n1 woff2_compress

Boom!
#commandline #unix #linux
Author Public Key
npub1f58f2xqeh3ym3sjgqac6pgqxmqruya4wvxre229jnv3q2kk2eutqnmzg5d