467,081 Members | 1,224 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,081 developers. It's quick & easy.

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.
Aug 6 '08 #1
  • viewed: 847
Share:
1 Reply
KevinADC
Expert 2GB
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.

Similar topics

10 posts views Thread by Bob | last post: by
176 posts views Thread by Thomas Reichelt | last post: by
9 posts views Thread by Xah Lee | last post: by
31 posts views Thread by surfunbear@yahoo.com | last post: by
1 post views Thread by Chris Newman | last post: by
1 post views Thread by anderz1985 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.