There's more than one way to do things | |
PerlMonks |
ClearCase Command text in Backticks is ignoredby Deep_Plaid (Acolyte) |
on May 08, 2013 at 15:19 UTC ( [id://1032620]=perlquestion: print w/replies, xml ) | Need Help?? |
Deep_Plaid has asked for the wisdom of the Perl Monks concerning the following question: Oh Perl Masters. I seeketh wisdom on the following issue: I am running some ClearCase commands with a script that uses a ClearCase format option to format the output, so I don't have to do it with PERL. I'm running the command using Backticks, and appears to be ignoring the format option (i.e., gives the non-formatted output). The command is designed to list all the current checkouts within the context of the current UCM project (i.e., the branch in the current view). Here is the code:
The first command gets the stream name which is essentially the branch name that is used in the second command. The second command lists all the checkouts on that branch and formats the output so you only see the relative file path and user name. The code works, but it lists the full output instead of the formatted output. For example, if the command is run on a branch that has two checked out files, the expected (i.e., formatted) output is:
Instead I am getting the full output:
I would assume this has something to do with escaping - I have tried several different combinations with no effect (e.g., using single quotes instead of double, not escaping the double quotes, etc.). I do know that ClearCase format options are especially cantankerous in a Windows environment, so that might have something to do with it. I have tried using the system command instead, but that has trouble recognizing the $stream variable - it gets passed with the value of 0. Code:
I tried ${stream} but that did not work either. Still 0. If I enter the actual branch name in place of $stream, it works, but the output is all strung together without end of lines. Code:
Output:
And the end of the output has a 0, which is probably telling of my foible. Any assistance would be greatly appreciated. Thank you.
Back to
Seekers of Perl Wisdom
|
|