Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Commit 0516f83

Browse files
committed
Avoid non-standard escape sequences in tr command
POSIX says The <backslash>-escape sequences in Escape Sequences and Associated Actions ( '\\', '\a', '\b', '\f', '\n', '\r', '\t', '\v' ) shall be supported. The results of using any other character, other than an octal digit, following the <backslash> are unspecified. Also, if there is no character following the <backslash>, the results are unspecified. Instead, just use `--` to separate options and operands, since tr(1) is required to conform to the Utility Syntax Guidelines.
1 parent 9f66c14 commit 0516f83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

install-template.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ valopt() {
169169
local doc="$*"
170170
if [ $HELP -eq 0 ]
171171
then
172-
local uop=$(echo $op | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
172+
local uop=$(echo $op | tr '[:lower:]' '[:upper:]' | tr -- '-' '_')
173173
local v="CFG_${uop}"
174174
eval $v="$default"
175175
for arg in $CFG_ARGS

0 commit comments

Comments
 (0)