From 40dcefe990248df281c377c2ccf978c5d1250417 Mon Sep 17 00:00:00 2001 From: Patrick Van der Veken Date: Tue, 19 Dec 2017 13:36:25 +0100 Subject: [PATCH] Be more selective in data_strip_newline(): only remove LFs --- sources/lib/core/include_data.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/lib/core/include_data.sh b/sources/lib/core/include_data.sh index df9f61d..4fb0d82 100644 --- a/sources/lib/core/include_data.sh +++ b/sources/lib/core/include_data.sh @@ -248,15 +248,15 @@ return 0 # ----------------------------------------------------------------------------- # @(#) FUNCTION: data_strip_newline() # DOES: remove newlines -# EXPECTS: [string] with newlines -# OUTPUTS: [string] without newlines +# EXPECTS: [string] with newlines (UNIX) +# OUTPUTS: [string] without newlines (UNIX) # RETURNS: 0 # REQUIRES: n/a function data_strip_newline { (( ARG_DEBUG != 0 && ARG_DEBUG_LEVEL > 0 )) && set "${DEBUG_OPTS}" -print "${1}" | tr -d '\n' 2>/dev/null | tr -d '\r' 2>/dev/null +print "${1}" | tr -d '\r' 2>/dev/null return 0 }