Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old May 28th, 2008, 6:35 PM   #1
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 931
Rep Power: 4 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Quickly select random lines

I have a 100MB file with (I suspect) millions of lines of text in it. I need a way to select 100 random lines and place them in another file. I don't want to spend a lot of time writing a Python script to do this, and I'm not sure how well such a script would operate on such a large file. Does anyone know of a Unix command that could do this? If not, how would you go about this? Thanks.
titaniumdecoy is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Random "Letter" Generator kewlgeye Java 19 May 13th, 2008 10:52 AM
random Numbers in openGL csrocker101 C++ 5 Apr 24th, 2007 9:02 PM
time Delays and Random functions Markphaser C++ 17 Feb 21st, 2006 4:48 AM
Random Number & Average Problem Hadrurus Java 6 Aug 15th, 2005 2:08 PM
non repeating random number generation gencor45 C# 2 Feb 9th, 2005 1:11 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:54 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC