At 17:25 2001.05.29 -0400, [EMAIL PROTECTED] wrote:


>Hi All,
>       I am working on the following output.
>
>* /ebppvobstore/vobs/Core /ebppvobstore/vobs/aci.vbs public
>* /ebppvobstore/vobs/UCMCQ /ebppvobstore/vobs/UCMCQ.vbs public (ucmvob)
>   /ebppvobstore/vobs/Comp_Care /ebppvobstore/vobs/Comp_Care.vbs/ public
>
>I want to check for the asterisks and if found do something else do 
>something. I
>am having a little trouble to make this work.

That looks to be an easy one, as I don't have that 'cleartool' program I 
just past'ed that lines into a file named 'xxx', and then:

#!/usr/bin/perl
open(X, "xxx") || die "can't open: $!";
while(<X>)
{
         chop;
         s/\s+//;           # Remove all white space from the beginning of 
the line
         if(/^\*/)          # If '*' is the 1st char in the line...
         {
                 print "---> $_\n";      # '*' found, do your stuff here
         }
         else
         {
                 print "$_\n"; # not found
         }
}

that's it I guess...



----------
António Vasconcelos - ICQ #109994473 - Senior Network Management Support
CONVEX Portugal, Lda - T: +351-21-422-9200   F: +351-21-421-3787

Reply via email to