a guest Nov 24th, 2017 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- 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"
RAW Paste Data