Hello Team,
i have to read line by line in a while loop, and the input file has:.
# The script will start cppunit test application to run unit tests.
-LD_LIBRARY_PATH=$CPPUNIT_HOME/lib:\
+LD_LIBRARY_PATH=$VOBTAG/SS_UnitTest/lib:\
$VOBTAG/SS_BFD/BFDSCLI/build:\
$VOBTAG/SS_LibPMGMT/PmgmtCAPI/build:\
$VOBTAG/SS_LibPMGMT/PmgmtCppAPI/build:\
Index: SS_BFD/TXLDAPPlugIn/tst/cppunit/src/Main.cpp
===================================================================
--- SS_BFD/TXLDAPPlugIn/tst/cppunit/src/Main.cpp (.../SS_BFD_4.76) (revision 1970)
+++ SS_BFD/TXLDAPPlugIn/tst/cppunit/src/Main.cpp (.../SS_BFD_4.82) (revision 1970)
@@ -1,4 +1,5 @@
#include <iostream>
+#include <cstdlib>
but my below code is generating the output with "$VOBTAG" 3 lines in a single line.
#!/bin/bash
while read line
do
echo $line
echo "*****************"
done<$1
Output:
*****************
*****************
# The script will start cppunit test application to run unit tests.
*****************
-LD_LIBRARY_PATH=$CPPUNIT_HOME/lib:+LD_LIBRARY_PATH=$VOBTAG/SS_UnitTest/lib: $VOBTAG/SS_BFD/BFDSCLI/build: $VOBTAG/SS_LibPMGMT/PmgmtCAPI/build: $VOBTAG/SS_LibPMGMT/PmgmtCppAPI/build:Index: SS_BFD/TXLDAPPlugIn/tst/cppunit/src/Main.cpp
*****************
===================================================================
*****************
--- SS_BFD/TXLDAPPlugIn/tst/cppunit/src/Main.cpp (.../SS_BFD_4.76) (revision 1970)
*****************
+++ SS_BFD/TXLDAPPlugIn/tst/cppunit/src/Main.cpp (.../SS_BFD_4.82) (revision 1970)
*****************
@@ -1,4 +1,5 @@
*****************
#include <iostream>
*****************
+#include <cstdlib>
*****************
Could you pls let me know how i can read each line separately , the input file being svn diff, i don want to consider with what the line is ending(Ex. \).
Regards,
Chandana