• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unix scripting with Perforce commands - Need help

 
Shikhar Madhok
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

Shikhar
[ July 29, 2008: Message edited by: Shikhar Madhok ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic