I have the project.txt files at following directory (/home/data/check_
+data).
project.txt contins following contents:
<code>
PROJECT {
NAME:DCMS_DEMO
BLOCKS:test,de_top,new_block2
DENY_USERS:
WELCOME:
REVISION_LOCATION:../setup/projects/DCMS_DEMO/project_space
CHECKLISTS:Synthesis_L2_checklist,Block_Physical_design_checklist,ICC_
+L2_Checklist,Overall_DV,Formality_DCT_Vs_ICC,Fullchip_Physical_design
+_checklist,Formality_RTL_Vs_DCT,synthesis,Timing_analysis_checklist,c
+hecklist_tmp,Power_analysis_checklist,Block_DV,DFT,ICC_Top_level_Chec
+klist,test_copy_checklist,ICC_DPMHV_Checklist,CAD_checklist,FrontEnd_
+Design_Checklist
DESCRIPTION:Demonstration project
OWNER:sanandak
ALLOWED_UNIX_GROUPS:
}
Now i like to read the directory whereever the line starts with (REVISION_LOCATION:) from the project.txt files.And those directories should be consider as my input directory from the command line arguments.How can i do it.
code which i had tried are as follows:
#! /usr/bin/env perl
use strict;
use warnings;
use Getopt::Long qw( GetOptions );
GetOptions(
'root=s' => \my $input_dir,
'outdir=s' => \my $output_dir,
'file=s' => \my $mapfile,
)
In the above i called the directory straightly from the location but m
+y question is first i should read the project.txt file from one locat
+ion and from that project.txt file i should read the directory(i.e t
+he line starts with REVISION_LOCATION).How can i script it using perl
+?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.