Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-05-2009, 10:05 PM   #1
Hustlin Entertainment
So Fucking Banned
 
Join Date: May 2002
Location: Nassau,Bahamas
Posts: 2,326
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

thanks
Hustlin Entertainment is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2009, 10:10 PM   #2
Angry Jew Cat - Banned for Life
(felis madjewicus)
 
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
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
Angry Jew Cat - Banned for Life is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2009, 10:13 PM   #3
Hustlin Entertainment
So Fucking Banned
 
Join Date: May 2002
Location: Nassau,Bahamas
Posts: 2,326
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....
Hustlin Entertainment is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2009, 10:55 PM   #4
Hustlin Entertainment
So Fucking Banned
 
Join Date: May 2002
Location: Nassau,Bahamas
Posts: 2,326
cut -d ':' -f 1 accounts.txt > accounts2.txt

easiest way i've found....

Hustlin Entertainment is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2009, 11:50 PM   #5
mikesouth
Confirmed User
 
mikesouth's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: My High Horse
Posts: 6,334
Quote:
Originally Posted by Hustlin Entertainment View Post
cut -d ':' -f 1 accounts.txt > accounts2.txt

easiest way i've found....

yup thats the right way to do it.
__________________
Mike South

It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.
mikesouth is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2009, 11:53 PM   #6
mikesouth
Confirmed User
 
mikesouth's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: My High Horse
Posts: 6,334
Quote:
Originally Posted by Hustlin Entertainment View Post
cut -d ':' -f 1 accounts.txt > accounts2.txt

easiest way i've found....

yup thats the right way to do it. cept you should probably use >> accounts2.txt lest you overwrite it every line dont remember how cut parses for that but >> would work either way long as ya dont run it more than once
__________________
Mike South

It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.
mikesouth is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.