Skip to content

Instantly share code, notes, and snippets.

@petrabarus
Created October 28, 2016 06:01
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petrabarus/59a512b9e04bfc465d33b555308e6747 to your computer and use it in GitHub Desktop.
Save petrabarus/59a512b9e04bfc465d33b555308e6747 to your computer and use it in GitHub Desktop.
Execute random variable for each xargs argument
#!/usr/bin/env bash
seq 10 | xargs -I X bash -c "echo X \$RANDOM"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment