Created
August 21, 2014 17:05
-
-
Save thcipriani/0ba92007f51145d778d4 to your computer and use it in GitHub Desktop.
Find lines in file > 5 words
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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