Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
randomly select lines from a list
Name: badger Date: April 15, 2008 at 12:24:34 Pacific OS: Mac OSX CPU/Ram: N/A Product: mac
Comment:
Hi all,
I have a text file that has 142 lines each containing several columns. I'm trying to write a script that will randomly choose half of the lines, then write these to a new text file. So, the result would be a file similar to the original, but containing only 71 lines with none repeating. Any advice/help would be greatly appreciated.
Summary: Hi All, I want to get the first line from a file and write it into another file. Please help. Thanks in advance. Regards, Raj Thanks & Regards, Raj...
Summary: Hi, I have a file containing 556,247 lines in it. I would like to extract the lines from 200,000 to 300,000. How do I acheive this using a single sed or awk command? Can some one help? Thanks, Balaji....
Summary: hi, I am trying to write a script to delete few lines from the existing files. The requirement is as follows: 1. I need to grep for a pattern "abc" in a file and then grep for "xyz" 2. I need to delet...