Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 283 Bytes

grep.md

File metadata and controls

11 lines (7 loc) · 283 Bytes

grep

👋 Errors, improvements or other cool stuff? Let me know! 😀

Extract only the part that matches

grep -oP "@version \K.+$" file  # Keep only the part after the \K.
grep -oP "(?<=PATTERN_BEFORE).+(?=PATTERN_AFTER)" file  # Extract the part in between.