Sorry if its to naive. I am wanting to write a simple PERL script that will accept two arguments(Here Commit Labels) which are taken as inputs to cleartool command and provides me with a suitable output.
My Code:
#!/usr/bin/perl
$file1 = system('cleartool find . -version "lbtype($ARGV[0])" -print > filename1');
$file2 = system('cleartool find . -version "lbtype($ARGV[1])" -print > filename2');
$file3 = system('diff filename1 filename2 > changeset');
print $ARGV[0];
print $ARGV[1];
print $file3;
close filename1;
close filename2;
close changeset
The output now is 3 empty files: filename1,filename2 and changeset. But i need the files committed between the two committed labels.
Could anyone shed light as to where i am going wrong!!
Thanks in advance.
try this:
instead of
You have also some Perl package to facilitate the execution of
cleartool
commands.CCCmd
: you can see it illustrated in "How can I interact with ClearCase from Perl?"ClearCase::CtCmd
That would allow to directly get the result in an array, instead of a file (even though you can dump that array in a file if you need to)