diff mbox

[2/2] runltp: rework echo -n to printf POSIX-compliant

Message ID 1377784548-1036-3-git-send-email-anders.roxell@linaro.org
State New
Headers show

Commit Message

Anders Roxell Aug. 29, 2013, 1:55 p.m. UTC
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 runltp | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

Comments

Cyril Hrubis Sept. 2, 2013, 4:38 p.m. UTC | #1
Hi!
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>  runltp | 15 +++++----------
>  1 file changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/runltp b/runltp
> index a419bf8..eb8e0c0 100755
> --- a/runltp
> +++ b/runltp
> @@ -537,18 +537,13 @@ main()
>          {
>              [ -z "$RHOST" ] && \
>              {
> -                echo \
> -                "INFO: Enter RHOST = 'name of the remote host machine'"
> -                echo -n "-> "
> +                printf "INFO: Enter RHOST = 'name of the remote host machine'\n-> "

Please do not add lines that are over 80 characters.
diff mbox

Patch

diff --git a/runltp b/runltp
index a419bf8..eb8e0c0 100755
--- a/runltp
+++ b/runltp
@@ -537,18 +537,13 @@  main()
         {
             [ -z "$RHOST" ] && \
             {
-                echo \
-                "INFO: Enter RHOST = 'name of the remote host machine'"
-                echo -n "-> "
+                printf "INFO: Enter RHOST = 'name of the remote host machine'\n-> "
                 read RHOST
             }
 
             [ -z "$PASSWD" ] && \
             {
-                echo " "
-                echo \
-                "INFO: Enter PASSWD = 'root passwd of the remote host machine'"
-                echo -n "-> "
+                printf "\nINFO: Enter PASSWD = 'root passwd of the remote host machine'\n-> "
                 read PASSWD
             }
             export RHOST=$RHOST
@@ -733,15 +728,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"
+    printf "LOG File: "
     echo $LOGFILE | cut -b4-
 
     if [ "$OUTPUTFILE" ]; then
-       echo -e "OUTPUT File: \c"
+       printf "OUTPUT File: "
        echo $OUTPUTFILE | cut -b4-
     fi
 
-    echo -e "FAILED COMMAND File: \c"
+    printf "FAILED COMMAND File: "
     echo $FAILCMDFILE | cut -b4-
 
     if [ "$HTMLFILE" ]; then