I am trying to gather the filenames from a very big file depending on if a particular user, in this case windowsdom\nasarchive is found.
I tried running sed -nr "/-{3,}/h; /Path\s*:/H; /windowsdom\\nasarchive\s+Allow\s+FullControl/{x;G;p}" logfilename but it does not bring anything.
-----------------------
Path: U:\Credit share\BI-WEEKLY CREDIT NOTES\2010\Credit status - April 21 - 2.doc
AccessToString : windowsdom\nasarchive Allow FullControl
BUILTIN\Administrators Allow FullControl
NT AUTHORITY\SYSTEM Allow FullControl
BUILTIN\Users Allow ReadAndExecute, Synchronize
-----------------------
Path: U:\Credit share\BI-WEEKLY CREDIT NOTES\2009\Credit status - Sept. 23 - 59.doc
AccessToString : windowsdom\acl_1 Allow ReadAndExecute, Synchronize
windowsdom\acl_2 Allow Modify, Synchronize
windowsdom\acl_3 Allow ReadAndExecute, Synchronize
windowsdom\adm_server Allow Modify, Synchronize
BUILTIN\Administrators Allow FullControl
-----------------------
Path: U:\Credit share\BI-WEEKLY CREDIT NOTES\2010\Credit status - August 10 - 3.doc
AccessToString : windowsdom\nasarchive Allow FullControl
BUILTIN\Administrators Allow FullControl
NT AUTHORITY\SYSTEM Allow FullControl
BUILTIN\Users Allow ReadAndExecute, Synchronize
-----------------------
Expected result:
Path: U:\Credit share\BI-WEEKLY CREDIT NOTES\2010\Credit status - April 21 - 2.doc
Path: U:\Credit share\BI-WEEKLY CREDIT NOTES\2010\Credit status - August 10 - 3.doc
Can someone think how to get the expected result?