Skip to content

Instantly share code, notes, and snippets.

@thcipriani
Created August 21, 2014 17:05
Show Gist options
  • Save thcipriani/0ba92007f51145d778d4 to your computer and use it in GitHub Desktop.
Save thcipriani/0ba92007f51145d778d4 to your computer and use it in GitHub Desktop.
Find lines in file > 5 words
#!/usr/bin/env bash
while read line; do
if (( $(echo $line | wc -w) > 5 )); then
echo "$line is greater than 5 words"
fi
done < "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment