Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- grep -c pattern file
- grep -n pattern file | cut -d : -f 1 | tail -1
- awk '/pattern/ {last = NR; count++}
- END {printf "Last: %snCount: %dn", last, count}' < file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement