
sheet.pangasa
Novice
Jan 11, 2013, 9:10 AM
Post #1 of 10
(2602 views)
|
Fetch specific content from file
|
Can't Post
|
|
Hi All, I know perl has extremely good string manipulation capabilities and a lot can be done through it. I have a file which gets generated by one process and there is a requirement to fetch specific content from the file and either store the output is a separate file or make the modifications to the same file. The contents of the file are below. I just need to fetch the folder names from it. The folder names will change whenever the process runs but everything above and below it will remain same except the date etc:
Informatica(r) PMREP, version [8.6.0], build [178.0613], Windows 32-bit Copyright (c) Informatica Corporation 1994 - 2008 All Rights Reserved. This Software may be protected by U.S. Patent Numbers 6,208,990; 6,044,374; 6,014,670; 6,032,158; 5,794,246; 6,339,775; 6,850,947; 6,895,471; 7,254,590 and other U.S. Patents Pending. Invoked at Fri Jan 11 22:32:09 2013 Connected to repository repo1 in Domain_SheetPangasa-PC as user Administrator connect completed successfully. Completed at Fri Jan 11 22:32:14 2013 Successfully connected to repo1 Informatica(r) PMREP, version [8.6.0], build [178.0613], Windows 32-bit Copyright (c) Informatica Corporation 1994 - 2008 All Rights Reserved. This Software may be protected by U.S. Patent Numbers 6,208,990; 6,044,374; 6,014,670; 6,032,158; 5,794,246; 6,339,775; 6,850,947; 6,895,471; 7,254,590 and other U.S. Patents Pending. Invoked at Fri Jan 11 22:32:14 2013 f1 ff4 f5 f8 f9 f10 folder1 folder2 folder3 f2 f3 f6 f7 .listObjects completed successfully. Completed at Fri Jan 11 22:32:19 2013 Folder list has been fetched successfully for repo1 From the above contents i would want to fetch:
f1 ff4 f5 f8 f9 f10 folder1 folder2 folder3 f2 f3 f6 f7 Any pointers on how this can be done in perl? I can do this using shell with grep or sed but would really want to do in perl. thanks, Sheet
(This post was edited by sheet.pangasa on Jan 11, 2013, 9:17 AM)
|