dejagnu
[Top][All Lists]
Advanced

[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:1.8.1.22) Gecko/20090807 MultiZilla/1.8.3.4e SeaMonkey/1.1.17 Mnenhy/0.7.6.0

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:http://pubs.opengroup.org/onlinepubs/009695399/utilities/sed.html> 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.
----
patch:
----
diff --git a/dejagnu b/dejagnu
index 6cd52f6..7e75940 100755
--- a/dejagnu
+++ b/dejagnu
@@ -402,7 +402,7 @@ if $want_help ; then
        exit 2
    fi
    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 
"'$help_prefix_pat'"
    fi
----


-- Jacob



reply via email to

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