From bdf2af54a800470990a66d11b14589e19fa568ac Mon Sep 17 00:00:00 2001 From: Arthur Williams Date: Fri, 4 Jun 2021 21:44:03 -0700 Subject: 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 --- startx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'startx.cpp') 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 -- cgit v1.2.3