Skip to content

Instantly share code, notes, and snippets.

@rtanglao
Created April 3, 2015 20:03
Show Gist options
  • Save rtanglao/86b2176b92e016b72c9f to your computer and use it in GitHub Desktop.
Save rtanglao/86b2176b92e016b72c9f to your computer and use it in GitHub Desktop.
process 100 files at a time
# Bash
files=(/usr/include/*.h /usr/include/sys/*.h)
for ((i=0; i<${#files[*]}; i+=100)); do
grep foo "${files[@]:i:100}" /dev/null
done
@rtanglao
Copy link
Author

rtanglao commented Apr 3, 2015

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