This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
We are using perforce as our version control system. I need to write a script which will list all the files that have changed between 2 branches and I also need to provide the list of users who may have touched the file. So, I am looking for an output something like
This output can be comma separated. We would like to open this report in excel and do any analysis that may be required. I have at my disposal a few commands provided by perforce. I have been able to make some progress using redirection but feel that it would be better if I wrote a shell script instead.
I first run the following command.
The contents of report.csv are as follows
I then use the follwoing commands to format the file
After running the above commands the contents of report.csv are something like
This is as far as I have got.
I have another command to generate the list of users who have touched a file. So what I need to do is iterate to the contents of report.csv and run the command for each file. The command that generates the list of users is
and the output it generates is
I have formatted the above output using
and I get the following output
And that is where I have stopped. I have the 2 commands and the formatted output from each. However I feel there should be a much cleaner way to do this using shell scripting. Unfortunately I am not so comfortable with shell scripting. Would appreciate if anyone could provide me with any suggestion on how can I go about writing a script for this. Any links etc will be appreciated as well.
Thanks for being patient to read such a long post. And thank you for your help.