Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- read START
- read END
- read MATCH
- REND=$(grep -n "$END" lines | tail -1 | cut -d":" -f 1)
- RSTART=$(grep -n "$START" lines | head -1 | cut -d":" -f 1)
- echo $REND $RSTART
- sed $RSTART,$REND!d lines | grep "$MATCH"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement