![]() |
linux gurus
hey..i have a question for all you linux gurus out there..i have a small list of usernames and passwords..i want to extract the usernames only and put them into a seperate text file
the file looks like this [email protected]:password [email protected]:password2 i want to extract the #@test.com's,...how can i do this...im not new to linux just haven't used it in awhile :helpme thanks |
write a quick perl script that'll extract all the emails. can't remember the name of the module that extracts emails of the top of my head. but if you search cpan you should find it easily enough. a little goolging should turn up smple code that'll perform the task. seems like a pretty common task to perform.
try this perl -wne'while(/[\w\.]+@[\w\.]+/g){print "$&\n"}' test.txt |
well i think i found something with grep, i don't think i even got perl installed on this box it'd be too much hassle, i'll post back with my results soon enough....
|
cut -d ':' -f 1 accounts.txt > accounts2.txt
easiest way i've found.... :pimp |
Quote:
|
Quote:
|
All times are GMT -7. The time now is 10:21 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123