Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15634

How to capture 2 to 4 pieces of data in a text file and store in .CSV file.

$
0
0
Hello and thank you for any and all help given in advance.

I have a text file that was generated from a firewall on a network. I need to pull out the user name and the ldap_server name.
It's a long list and all the data I am trying to collect is spread out.
However, what I am looking for is enclosed in double quotes "Example" some of it is in uppercase and some all lower.
here is what the file looks like. Please see below.
I have placed all the data I want to collect in blue. As you can see it is different lengths as well.

I know the basics of opening a file reading writing and closing.
what I don't know is how to get only the little bits hidden.
how do I set a delimiter to only get the info between the " "s

show user local

exit

Welcome!



GMG-CAAEN-FW-01 # show user local


config user local

edit "rbogsher"

set status disable

set type password

set email-to "rbogsher@vbcityllc.com"

set sms-phone "+15555555555"

set passwd-time 2019-12-03 13:26:38

set passwd ENC xGst25WPzXrmCy8vqXowFEOHhJZLCCb3Vj4XpNw40J6SpHW6oop1l32AMyVmDvYW7sSTytiHExICblZ86Pk41yQHk6he5/r754/M1zXXcwnd9RxJJ0BsuFa4EeuFygpGQ8zo70Bl5SdDatixkoRuJ8N/gx91qrjxlqWDwH1xVHXZ3Q6bog7/3SWKZYLb0hqJfhy6Eg==

next

edit "pesters"

set status disable

set type password

set email-to "rbogsher@vbcityllc.com"

set passwd-time 2016-05-13 14:11:56

set passwd ENC xGst25WPzXrmCy8vqXowFEOHhJZLCCb3Vj4XpNw40J6SpHW6oop1l32AMyVmDvYW7sSTytiHExICblZ86Pk41yQHk6he5/r754/M1zXXcwnd9RxJJ0BsuFa4EeuFygpGQ8zo70Bl5SdDatixkoRuJ8N/gx91qrjxlqWDwH1xVHXZ3Q6bog7/3SWKZYLb0hqJfhy6Eg==

next

edit "v_cmiksch"

set status disable

set type password

set email-to "rbogsher@vbcityllc.com"

set passwd-time 2020-02-28 11:30:08

set passwd ENC xGst25WPzXrmCy8vqXowFEOHhJZLCCb3Vj4XpNw40J6SpHW6oop1l32AMyVmDvYW7sSTytiHExICblZ86Pk41yQHk6he5/r754/M1zXXcwnd9RxJJ0BsuFa4EeuFygpGQ8zo70Bl5SdDatixkoRuJ8N/gx91qrjxlqWDwH1xVHXZ3Q6bog7/3SWKZYLb0hqJfhy6Eg==

next

edit "cchen"

set type ldap

set ldap-server "BCMGT"

next

edit "gzhelnin"

set type ldap

set ldap-server "BCMGT"

next

edit "sellinger"

set type ldap

set ldap-server "BCMGT"

next

edit "MPhillips"

set type ldap

set ldap-server "BCMGT"

next

edit "jmccrea"

set type ldap

set ldap-server "BCMGT"

next

edit "bpope"

set type ldap

set ldap-server "BCM"

next

edit "NShybeka"

set type ldap

set ldap-server "BCMGT"

next

edit "PEsters"

set type ldap

set ldap-server "BCMGT"

next


Thanks again for taking the time to read and help.

Viewing all articles
Browse latest Browse all 15634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>