[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH: Improve POSIX conformance in dejagnu(1)

From: Jacob Bachmeyer
Subject: PATCH: Improve POSIX conformance in dejagnu(1)
Date: Fri, 28 Dec 2018 18:46:47 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20090807 MultiZilla/ SeaMonkey/1.1.17 Mnenhy/

While auditing the shell version of dejagnu-report-card for POSIX compliance, whether POSIX sed(1) is actually required to support using semicolon as a command separator seems to be unclear, but does permit multiple "-e" options. The text in <URL:> seems to suggest that only newlines are valid command separators, but that each "-e" option effectively has a newline appended.

This patch removes the one use of semicolon in a sed(1) program in the dejagnu(1) multi-launcher.

ChangeLog entry:
        * dejagnu: Avoid use of semicolon as sed(1) command separator.
        POSIX does not clearly require sed(1) to support that feature.
diff --git a/dejagnu b/dejagnu
index 6cd52f6..7e75940 100755
--- a/dejagnu
+++ b/dejagnu
@@ -402,7 +402,7 @@ if $want_help ; then
        exit 2
    help_prefix_pat=$(grep '#help' "$help_file" \
-       | sed 's/#help.*$//;1q' | tr '[:print:][:blank:]' .)
+       | sed -e 's/#help.*$//' -e '1q' | tr '[:print:][:blank:]' .)
    if expr "$verbose" \> 1 > /dev/null ; then
        echo Extracting help from "'$help_file'" with prefix 

-- Jacob

reply via email to

[Prev in Thread] Current Thread [Next in Thread]