Skip to content

Commit 87d4c66

Browse files
authored
Merge pull request #3 from Denton-L/use-printf
Replace `echo -e` with `printf`
2 parents 8b5ed3e + 9e651c3 commit 87d4c66

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lsb_release/src/lsb_release

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ GetDistribInfo() {
299299
DisplayVersion() {
300300
if [ -z "$ARG_S" ]
301301
then
302-
echo -e "$MSG_LSBVER$LSB_VERSION" # at least "n/a"
302+
printf "$MSG_LSBVER$LSB_VERSION\\n" # at least "n/a"
303303
else
304304
MSG_RESULT="$MSG_RESULT${MSG_RESULT:+ }$LSB_VERSION"
305305
fi
@@ -323,7 +323,7 @@ DisplayID() {
323323
fi
324324
if [ -z "$ARG_S" ]
325325
then
326-
echo -e "$MSG_DISTID$DISTRIB_ID"
326+
printf "$MSG_DISTID$DISTRIB_ID\\n"
327327
else
328328
MSG_RESULT="$MSG_RESULT${MSG_RESULT:+ }$DISTRIB_ID"
329329
fi
@@ -338,7 +338,7 @@ DisplayDescription() {
338338
fi
339339
if [ -z "$ARG_S" ]
340340
then
341-
echo -e "$MSG_DISTDESC$DISTRIB_DESCRIPTION"
341+
printf "$MSG_DISTDESC$DISTRIB_DESCRIPTION\\n"
342342
else
343343
MSG_RESULT="$MSG_RESULT${MSG_RESULT:+ }\"$DISTRIB_DESCRIPTION\""
344344
fi
@@ -356,7 +356,7 @@ DisplayRelease() {
356356
fi
357357
if [ -z "$ARG_S" ]
358358
then
359-
echo -e "$MSG_DISTREL$DISTRIB_RELEASE"
359+
printf "$MSG_DISTREL$DISTRIB_RELEASE\\n"
360360
else
361361
MSG_RESULT="$MSG_RESULT${MSG_RESULT:+ }$DISTRIB_RELEASE"
362362
fi
@@ -374,8 +374,8 @@ DisplayCodename() {
374374
fi
375375
if [ -z "$ARG_S" ]
376376
then
377-
echo -e "$MSG_DISTCODE$(echo "$DISTRIB_CODENAME" | \
378-
tr -d "[:blank:]")" # Remove blanks
377+
printf "$MSG_DISTCODE$(echo "$DISTRIB_CODENAME" | \
378+
tr -d "[:blank:]")\\n" # Remove blanks
379379
else
380380
MSG_RESULT="$MSG_RESULT${MSG_RESULT:+ }$(echo "$DISTRIB_CODENAME" | \
381381
tr -d "[:blank:]")"

0 commit comments

Comments
 (0)