diff options
author | Robin Obůrka <r.oburka@gmail.com> | 2016-10-10 23:16:06 +0200 |
---|---|---|
committer | Robin Obůrka <r.oburka@gmail.com> | 2016-10-10 23:16:06 +0200 |
commit | 390772629694c8504c072ec0645ae2384981bcdf (patch) | |
tree | e24b7ca6c475192f5d3bbd45cecd83837d9a9017 | |
parent | wpos: Provide command list (diff) | |
download | display_autoset-390772629694c8504c072ec0645ae2384981bcdf.tar.xz |
Fix regexp in grep
-rwxr-xr-x | autodetect.sh | 4 |
1 files 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() { |