From 390772629694c8504c072ec0645ae2384981bcdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Ob=C5=AFrka?= Date: Mon, 10 Oct 2016 23:16:06 +0200 Subject: Fix regexp in grep --- autodetect.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autodetect.sh b/autodetect.sh index dcef6ed..04da869 100755 --- a/autodetect.sh +++ b/autodetect.sh @@ -23,7 +23,7 @@ XRANDR="$(xrandr -q)" ## Some functions get_resolution() { - grep -A1 "^$1\s*connected" | tail -n1 | awk '{ print $1 }' + grep -A1 "^$1\\s*connected" | tail -n1 | awk '{ print $1 }' } detect_status() { @@ -39,7 +39,7 @@ detect_all() { } detect_active() { - grep -A1 "^$1\s*connected" | tail -n1 | awk '{ print $2 }' | grep '\*' + grep -A1 "^$1\s\*connected" | tail -n1 | awk '{ print $2 }' | grep '\*' } off_except() { -- cgit v1.2.3