perl pattern matching

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sriramulu
    New Member
    • Aug 2008
    • 1

    #1

    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:\S YSTEM_TEST\" /NODEFAULT
    RI "PA:PSP_057 1.A-FILE;na#25" /USER_FILENAME=" D:\HOT\SCMR\SYS TEM_TEST\build\ Auto2.txt" /COMMENT="revisi on"
    FI "PA:PSP_057 1.A-FILE" /USER_FILE="D:\S YSTEM_TEST\buil d\Auto2.txt"
    BI "PSP_9728.A-FILE" /PART="PA:SYSTEM _TEST.Z" /WS_FILENAME="bu ild\BSM_46_01.t xt" /FILENAME="a901-01.txt"

    SCWS "PA:SYSTEM_TEST " /DIRECTORY="D:\S YSTEM_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.
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    Do you know any perl? What have you tried so far?

    Comment

    Working...