Skip to content

Instantly share code, notes, and snippets.

@psycharo-zz
Created February 7, 2013 11:23
Show Gist options
  • Save psycharo-zz/4730397 to your computer and use it in GitHub Desktop.
Save psycharo-zz/4730397 to your computer and use it in GitHub Desktop.
example of using xargs to manage stdout redirections
ls 2012-12-{}.log | xargs -I file sh -c 'head -n 1000000 file > file.1m'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment