My output currently is:
echo "Time Taken to checkout svn repository repo_performance hosted on $host on `date` is : $Time_checkout seconds" >> log.csv
echo "Time Taken to add $loopmax 10MB svn files in svn repository repo_performance hosted on $host `date` is : $Time_add seconds" >> log.csv
echo "Time Taken to commit $loopmax 10MB svn files in svn repository repo_performance hosted on $host on `date` is : $Time_commit seconds" >> log.csv
But, I want to create a csv file which has Host, Date, Operation, Duration and its values in the rows.
How can I make it using scripting ?
To create a CSV file with a text editor, first choose your favorite text editor, such as Notepad or vim, and open a new file. Then enter the text data you want the file to contain, separating each value with a comma and each row with a new line. Save this file with the extension . csv.
Creating CSV File With ExcelAfter you create the spreadsheet, go to “File” and choose “Save As.” Click the drop-down menu labeled “Save as type” in the window that appears and choose “CSV (comma delimited)” from the list.
You may just do:
echo "$host, `date`, checkout,$Time_checkout" >> log.csv
echo "$host, `date`, add, $Time_add" >> log.csv
echo "$host, `date`, cimmit, $Time_commits" >> log.csv
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With