By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,177 Members | 976 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,177 IT Pros & Developers. It's quick & easy.

perl pattern matching

P: 1
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.
Aug 6 '08 #1
Share this Question
Share on Google+
1 Reply


KevinADC
Expert 2.5K+
P: 4,059
Do you know any perl? What have you tried so far?
Aug 6 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.