summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Robin Obůrka <r.oburka@gmail.com> 2016-10-10 23:16:06 +0200
committerGravatar Robin Obůrka <r.oburka@gmail.com> 2016-10-10 23:16:06 +0200
commit390772629694c8504c072ec0645ae2384981bcdf (patch)
treee24b7ca6c475192f5d3bbd45cecd83837d9a9017
parentwpos: Provide command list (diff)
downloaddisplay_autoset-390772629694c8504c072ec0645ae2384981bcdf.tar.xz
Fix regexp in grep
-rwxr-xr-xautodetect.sh4
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() {