Skip to content

Instantly share code, notes, and snippets.

@dukex
Created December 3, 2013 01:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dukex/7762202 to your computer and use it in GitHub Desktop.
Save dukex/7762202 to your computer and use it in GitHub Desktop.
#!/bin/bash
n=0
cat $1 | while read line; do
n=`expr $n + 1`
if [[ $line == *"$2"* ]] ; then
echo "LINHA $n: $line"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment