Skip to contentSkip to conversation

Rework to printf and added required import

PATCH In review Anders Roxell 2 participants 8 messages Aug 29, 2013 – Sep 3, 2013

lore
Share & tools
lore
#0 lore raw

v2 cover Rework to printf and added required import

Hi,

Rewoked to printf and added required import

/Anders

Anders Roxell (2):
realtime parser: remove unused and depricated imports
runltp: rework echo -n to printf POSIX-compliant

 runltp                               | 15 +++++----------
 testcases/realtime/scripts/parser.py |  2 +-
 2 files changed, 6 insertions(+), 11 deletions(-)
Signature · 13 lines
1.8.1.2


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw

PATCH v2 1/2 realtime parser: remove unused and depricated imports

---
 testcases/realtime/scripts/parser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/realtime/scripts/parser.py +1 -1
index b90233c..6b2dc73 100644
@@ -26,7 +26,7 @@
 ##                                                                            ##
 ################################################################################
 
-import sys,os,string,re
+import sys
 
 class Log:
     def __init__(self,filename):
Signature · 13 lines
1.8.1.2


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#2 lore raw

Re: [LTP] [PATCH 1/2] realtime parser: remove unused and depricated imports

Hi!

Quoted 10 lines
---
 testcases/realtime/scripts/parser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/realtime/scripts/parser.py +0 -0
index b90233c..6b2dc73 100644

testcases/realtime/scripts/parser.py line 29

Quoted 5 lines
testcases/realtime/scripts/parser.py +1 -1
@@ -26,7 +26,7 @@
 ##                                                                            ##
 ################################################################################
 
-import sys,os,string,re
+import sys

Pushed, thanks.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#3 lore raw

PATCH v2 2/2 runltp: rework echo -n to printf POSIX-compliant

In reply to Anders Roxell
---
 runltp | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
runltp +5 -10
index a419bf8..eb8e0c0 100755
@@ -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
Signature · 13 lines
1.8.1.2


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#4 lore raw

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

Hi!

Quoted 10 lines
---
 runltp | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
runltp +0 -0
index a419bf8..eb8e0c0 100755

runltp main() · line 540

Quoted 7 lines
runltp +1 -3
@@ -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.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#5 lore raw
In reply to Anders Roxell
Quoted 6 lines · Anders Roxell

Hi,

Rewoked to printf and added required import

/Anders

Quoted 11 lines

Anders Roxell (2):
realtime parser: remove unused and depricated imports
runltp: rework echo -n to printf POSIX-compliant

 runltp                               | 15 +++++----------
 testcases/realtime/scripts/parser.py |  2 +-
 2 files changed, 6 insertions(+), 11 deletions(-)
Signature · 1 line
1.8.1.2

Ping.

/Anders

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#6 lore raw

PATCH v3 1/1 runltp: rework echo -n to printf POSIX-compliant

In reply to Anders Roxell
---
 runltp | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
runltp +8 -10
index a419bf8..e86f5c7 100755
@@ -537,18 +537,16 @@ 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'"
+                printf "\n-> "
                 read RHOST
             }
 
             [ -z "$PASSWD" ] && \
             {
-                echo " "
-                echo \
-                "INFO: Enter PASSWD = 'root passwd of the remote host machine'"
-                echo -n "-> "
+                printf "\nINFO: "
+                printf "Enter PASSWD = 'root passwd of the remote host machine'"
+                printf "\n-> "
                 read PASSWD
             }
             export RHOST=$RHOST
@@ -733,15 +731,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
Signature · 13 lines
1.8.1.2


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#7 lore raw

Re: [LTP] [PATCHv3] runltp: rework echo -n to printf POSIX-compliant

Hi!

Quoted 4 lines
---
 runltp | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

Pushed, thanks.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list