home.social

#xargs β€” Public Fediverse posts

Live and recent posts from across the Fediverse tagged #xargs, aggregated by home.social.

  1. #TIL: #xargs has an option -a to read items from a file instead of from standard input. This is perfect if you need to run xargs without a surrounding shell to provide the commonly used pipe mechanism, e.g. calling it just via exec() or similar.

    My case today was with Perl's Test::Command::Simple::run_ok() in pxzgrep's TAP based test suite.

    #linuxcli #cli #climagic #commandlinemagic

  2. #unix is awesome #oneliner #otd

    "Hey UNIX, give me a list of all our infra projects that create databases sorted by linecount"

    rg -l OLAmazonDB | xargs wc -l | sort

    This message brought to you by the awesome power of #ripgrep and #xargs :)