Message ID | 1377761241-17744-3-git-send-email-anders.roxell@linaro.org |
---|---|
State | New |
Headers | show |
On Thu, Aug 29, 2013 at 9:27 AM, Anders Roxell <anders.roxell@linaro.org> wrote: > Signed-off-by: Anders Roxell <anders.roxell@linaro.org> > --- > runltp | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/runltp b/runltp > index a419bf8..970c4ee 100755 > --- a/runltp > +++ b/runltp > @@ -733,15 +733,15 @@ main() > #$PAN_COMMAND #Duplicated code here, because otherwise if we fail, only "PAN_COMMAND" gets output > > ## Display the Output/Log/Failed/HTML file names here > - echo -e "LOG File: \c" > + echo -n "LOG File: " > echo $LOGFILE | cut -b4- > > if [ "$OUTPUTFILE" ]; then > - echo -e "OUTPUT File: \c" > + echo -n "OUTPUT File: " > echo $OUTPUTFILE | cut -b4- > fi > > - echo -e "FAILED COMMAND File: \c" > + echo -n "FAILED COMMAND File: " > echo $FAILCMDFILE | cut -b4- > > if [ "$HTMLFILE" ]; then > -- > 1.8.1.2 > Yesterday, I looked through diverse GIT repos where I saw a commit saying that "echo" (dunno if it was "-e" or "-n") is not POSIX-compliant and "printf" should be used. I am no POSIX guy, but maybe someone can confirm this? - Sedat - P.S.: Google gave me... [1] http://pubs.opengroup.org/onlinepubs/009696799/utilities/echo.html [2] https://bugs.kde.org/show_bug.cgi?id=160368
Hi, On 2013-08-29 10:41, Sedat Dilek wrote: > On Thu, Aug 29, 2013 at 9:27 AM, Anders Roxell <anders.roxell@linaro.org> wrote: > > Signed-off-by: Anders Roxell <anders.roxell@linaro.org> > > --- > > runltp | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/runltp b/runltp > > index a419bf8..970c4ee 100755 > > --- a/runltp > > +++ b/runltp > > @@ -733,15 +733,15 @@ main() > > #$PAN_COMMAND #Duplicated code here, because otherwise if we fail, only "PAN_COMMAND" gets output > > > > ## Display the Output/Log/Failed/HTML file names here > > - echo -e "LOG File: \c" > > + echo -n "LOG File: " > > echo $LOGFILE | cut -b4- > > > > if [ "$OUTPUTFILE" ]; then > > - echo -e "OUTPUT File: \c" > > + echo -n "OUTPUT File: " > > echo $OUTPUTFILE | cut -b4- > > fi > > > > - echo -e "FAILED COMMAND File: \c" > > + echo -n "FAILED COMMAND File: " > > echo $FAILCMDFILE | cut -b4- > > > > if [ "$HTMLFILE" ]; then > > -- > > 1.8.1.2 > > > > Yesterday, I looked through diverse GIT repos where I saw a commit > saying that "echo" (dunno if it was "-e" or "-n") is not > POSIX-compliant and "printf" should be used. > I am no POSIX guy, but maybe someone can confirm this? Thanks, I will rework and resend the patch. /Anders
On Thursday 29 August 2013 04:41:33 Sedat Dilek wrote: > On Thu, Aug 29, 2013 at 9:27 AM, Anders Roxell wrote: > > - echo -e "LOG File: \c" > > + echo -n "LOG File: " > > Yesterday, I looked through diverse GIT repos where I saw a commit > saying that "echo" (dunno if it was "-e" or "-n") is not > POSIX-compliant and "printf" should be used. > I am no POSIX guy, but maybe someone can confirm this? use `printf` please for both -e and -n issues -mike
Hi, On 2013-08-29 20:16, Mike Frysinger wrote: > On Thursday 29 August 2013 04:41:33 Sedat Dilek wrote: > > On Thu, Aug 29, 2013 at 9:27 AM, Anders Roxell wrote: > > > - echo -e "LOG File: \c" > > > + echo -n "LOG File: " > > > > Yesterday, I looked through diverse GIT repos where I saw a commit > > saying that "echo" (dunno if it was "-e" or "-n") is not > > POSIX-compliant and "printf" should be used. > > I am no POSIX guy, but maybe someone can confirm this? > > use `printf` please for both -e and -n issues I did resend the patch yesterday, with subject: "[PATCHv2 0/2] Rework to printf and added required import" /Anders
diff --git a/runltp b/runltp index a419bf8..970c4ee 100755 --- a/runltp +++ b/runltp @@ -733,15 +733,15 @@ main() #$PAN_COMMAND #Duplicated code here, because otherwise if we fail, only "PAN_COMMAND" gets output ## Display the Output/Log/Failed/HTML file names here - echo -e "LOG File: \c" + echo -n "LOG File: " echo $LOGFILE | cut -b4- if [ "$OUTPUTFILE" ]; then - echo -e "OUTPUT File: \c" + echo -n "OUTPUT File: " echo $OUTPUTFILE | cut -b4- fi - echo -e "FAILED COMMAND File: \c" + echo -n "FAILED COMMAND File: " echo $FAILCMDFILE | cut -b4- if [ "$HTMLFILE" ]; then
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> --- runltp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)