From 42df40711397e357550eb0bd5af21fc7534d75ca Mon Sep 17 00:00:00 2001 From: onceupon Date: Wed, 1 Nov 2017 17:59:03 +0800 Subject: [PATCH] add grep only integers --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index c086224..0466e3a 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,13 @@ http://onceupon.github.io/Bash-Oneliner/ grep -o -P '(?<=w1).*(?=w2)' ``` +##### Grep only integer + +```bash +grep -o '[0-9]*' +``` + + ##### Grep lines without word (e.g. bbo) ```bash