Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- it=10
- bench () {
- echo -n $1:
- time for ((i = 0; i < it; i++)); do
- "$@" /usr/include/{*.h,*/*.h} > /dev/null 2>&1 < /dev/null
- done
- echo
- }
- bench grep -h "#include.*stdio"
- bench awk '/#include.*stdio/ {print}'
- bench sed -rn '/#include.*stdio/p'
- bench perl -ne 'print if /#include.*stdio/'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement