Skip to content

Instantly share code, notes, and snippets.

@tracertea
Created September 8, 2015 18:26
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 tracertea/1b7e6c563c9553e8f595 to your computer and use it in GitHub Desktop.
Save tracertea/1b7e6c563c9553e8f595 to your computer and use it in GitHub Desktop.
Run batch multi parameter commands
cat myFile.txt | xargs -I {} sh -c 'p=(`echo $0`); echo ${p[1]} ${p[0]}' {}
cat myFile.txt | xargs -n1 | while read f; read g; do echo $f $g; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment