summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Williams <taaparthur@gmail.com>2021-06-04 21:44:03 -0700
committerArthur Williams <taaparthur@gmail.com>2021-06-04 21:44:03 -0700
commitbdf2af54a800470990a66d11b14589e19fa568ac (patch)
tree0383d760e172a2e2d44117e434af3c04015a735c
parentae77976adaae9948e3e8d7a673dc88df4e31de46 (diff)
downloadxorg-app-xinit-bdf2af54a800470990a66d11b14589e19fa568ac.tar.gz
Remove non-portable grep usage from startx
startx uses non-portable grep flags (-o). grep isn't even needed for this and has been replaced with substring removal. Closes #6
-rw-r--r--startx.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/startx.cpp b/startx.cpp
index 125c398..31187b9 100644
--- a/startx.cpp
+++ b/startx.cpp
@@ -206,7 +206,7 @@ if [ x"$server" = x ]; then
XCOMM "https://bugzilla.redhat.com/show_bug.cgi?id=806491"
tty=$(tty)
if expr "$tty" : '/dev/tty[0-9][0-9]*$' > /dev/null; then
- tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
+ tty_num=${tty#/dev/tty}
vtarg="vt$tty_num -keeptty"
fi
#endif