I\'m writing the script that searches for lines that match some pattern. I must use sed for this script. This works fine for searching and printing matched lines:
For sed, use following to get line number
sed -n /PATTERN/=