windows - Read log file and get lines in columns instead of rows -
have log file , want read lines single line columns excel. stacked in rows. want stack 3 lines 1 line in reverse 3>2>1
for /f "delims=~" %%a in (svn.log) echo %%a set col3 = %%a echo col3 col2 col1
is there easy way this?
input log: >>>>
line#1 >r132852 | userid | 2014-05-14 11:57:38 -0700 (wed, 14 may 2014) | 3 lines line#2 >>>changed paths: m /customer/lag/inilib/asips_4600.ini m /customer/lag/inilib/asips_4600_text_search.ini line#3>> connections tab in plan authoring , wo execution. line#4>> ques id: ques-806
output log: >>>
line#4>> ques id: ques-806 line#1 >>> r132852 | userid | 2014-05-14 11:57:38 -0700 (wed, 14 may 2014) | 3 lines line#2 >>>>changed paths: m /customer/lag/inilib/asips_4600.ini m /customer/lag/inilib/asips_4600_text_search.ini line#3 >>> connections tab in plan authoring , wo execution. ***
the output should in 1 straight line in columns
input log: ------------------------------------------------------------------------ r132994 | userid | 2014-05-19 06:22:51 -0700 (mon, 19 may 2014) | 3 lines changed paths: m /customer/company/ips/lag/message/asipsi_missing_page.sql m /customer/company/ips/lag/message/asipsi_missing_work_order.sql m /customer/company/ips/lag/message/asipsi_missing_work_plan.sql added messages in try catch display user in case objects not exist longer ques id: asips-1003 ------------------------------------------------------------------------ r132960 | userid | 2014-05-17 03:18:09 -0700 (sat, 17 may 2014) | 3 lines changed paths: modified command on product nodes tab display either wo or page ques id: asips-1003 ------------------------------------------------------------------------ r132879 | userid | 2014-05-15 01:18:32 -0700 (thu, 15 may 2014) | 4 lines changed paths: m /customer/company/ips/lag/udvlib/asipsi_541ca51a7ccb439fb318b8482e380f78.sql have forgotten remove 2 buttons have created merge pdf demo. ques id: asips-1003 ------------------------------------------------------------------------ r132878 | userid | 2014-05-15 01:05:10 -0700 (thu, 15 may 2014) | 4 lines changed paths: m /customer/company/ips/lag/udvlib/asipsi_541ca51a7ccb439fb318b8482e380f78.sql correction of tag property button [display object]. ques id: asips-1003 ------------------------------------------------------------------------ r132834 | userid | 2014-05-14 09:05:13 -0700 (wed, 14 may 2014) | 3 lines changed paths: m /customer/company/ips/lag/udvlib/asipsi_541ca51a7ccb439fb318b8482e380f78.sql display object in tab page nodes doesn’t display work order when node type ko. ques id: asips-1003
output required:
ques id: asips-1003, r132994 | userid | 2014-05-19 06:22:51 -0700 (mon, 19 may 2014) | 3 lines changed paths: m /customer/company/ips/lag/message/asipsi_missing_page.sql m /customer/company/ips/lag/message/asipsi_missing_work_order.sql m /customer/company/ips/lag/message/asipsi_missing_work_plan.sql added messages in try catch display user in case objects not exist longer ------------------------------------------------------------ -------------------------------
each line starting ques should 1 line across in csv file before there multiple revisions , ques id's
test on sample file:
@echo off < svn.log ( set /p a= set /p b= set /p c= set /p d= ) %%a in ("%d%,%c%,%b%,%a%") >newfile.csv echo %%~a pause
Comments
Post a Comment