Skip to content

Instantly share code, notes, and snippets.

@rhowardiv
Created December 9, 2010 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhowardiv/735348 to your computer and use it in GitHub Desktop.
Save rhowardiv/735348 to your computer and use it in GitHub Desktop.
nargs -- a wrapper for xargs -d'\n' that cleans leading/trailing whitespace
#!/bin/bash
sed 's/^[ ]\+//' | sed 's/[ ]\+$//' | xargs -d'\n' $@
@rhowardiv
Copy link
Author

Apparently GNU Parallel works this way by default. There's no RHEL package, but I guess it's just a Perl program...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment