Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to use parse_opts to  specify CVS tree as an option

Posted on 2006-06-20
8
Medium Priority
?
577 Views
Last Modified: 2011-08-18
I have a perl script which will need a way to specify the version of the tool that it will invoke.

Eg: run_app -cvstree  app_1.0.1.

I will be using parse_opts to parse the cmd line options. But it not clear to me how to write code to pick the CVS Tree branch as specified in the cmd line option.

Thanks,
Anu.
0
Comment
Question by:AnuPutcha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 9

Expert Comment

by:Suhas .
ID: 16950030
Hi AnuPutcha,
To run command line options in script use system:

system("run_app -cvstree app_1.0.1");

Cheers!
Suhas
0
 
LVL 39

Expert Comment

by:Adam314
ID: 16951941
Could you clearify, I'm not sure what you want to do?
0
 
LVL 84

Expert Comment

by:ozo
ID: 16953184
use Getopt::Long;
my $branch;
$result = GetOptions("cvstree=s" => \$branch);

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:AnuPutcha
ID: 16954209
I want to be able to specify a CVS branch as an option to a perl script so that the right version of the script is selected. Also can someone tell me how to see the CVS tree/ a cmd to see CVS tree?


Thanks
0
 
LVL 39

Expert Comment

by:Adam314
ID: 16954451
How would you specify which branch to run if you ran it from the command line?
Or how would you view a particular version of a file if you wanted to view it?

Once you have that, use the system command to start the same script, but the correct version.  

0
 
LVL 9

Expert Comment

by:Suhas .
ID: 16966640
0
 
LVL 39

Accepted Solution

by:
Adam314 earned 500 total points
ID: 16971622
According to that (and some other sites), it sounds like you can only access a particular version of a file if you check it out.  Is this correct?
Can you view a particular version of a file with out checking it out?
0
 

Author Comment

by:AnuPutcha
ID: 16973265
You are correct, apparently I cannot access a version without checking it out locally. I din't know this before and so I was thinking I could do that and wnated to know how to access CVS branch without checking it out.

Thanks!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question