Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old August 6th, 2008, 05:12 PM
Newbie
 
Join Date: Aug 2008
Posts: 1
Default perl pattern matching

Hello,

please Can anyone help me to get the below output.

My input file looks like this:
--------------------------------------------------------------------------------------------------------------------
SCWS "PA:SYSTEM_TEST" /DIRECTORY="D:\SYSTEM_TEST\" /NODEFAULT
RI "PA:PSP_0571.A-FILE;na#25" /USER_FILENAME="D:\HOT\SCMR\SYSTEM_TEST\build\Auto2 .txt" /COMMENT="revision"
FI "PA:PSP_0571.A-FILE" /USER_FILE="D:\SYSTEM_TEST\build\Auto2.txt"
BI "PSP_9728.A-FILE" /PART="PA:SYSTEM_TEST.Z" /WS_FILENAME="build\BSM_46_01.txt" /FILENAME="a901-01.txt"

SCWS "PA:SYSTEM_TEST" /DIRECTORY="D:\SYSTEM_TEST\" /NODEFAULT
--------------------------------------------------------------------------------------------------------------------


I wish to see a code that does the following:

If line starts with RI "whatever" otherstuff then outputs an additional line
containing "AI "whatever" set"
If line starts with BI "whatever" otherstuff then outputs an additional line
containing "AI "whatever" set"


Many Thanks in Advance.
Reply
  #2  
Old August 6th, 2008, 06:20 PM
KevinADC's Avatar
Expert
 
Join Date: Jan 2007
Posts: 3,661
Default

Do you know any perl? What have you tried so far?
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles