Delete from one row and up in a txt file?
Delete from one row and up in a txt file?
Could anyone help me to like, make or get a code/proggy that deletes everything from one row in a text document and up?
because i have dictionarys with 1500000000 words, and sometimes i want to delete everything from like row 80000 and up..and that takes time xP
because i have dictionarys with 1500000000 words, and sometimes i want to delete everything from like row 80000 and up..and that takes time xP
"The best place to hide a tree, is in a forest"
Here's a PHP script:
Code: Select all
<?PHP
$file = file('dictionary.txt');
$open = fopen('newdictionary.txt', 'a');
for($a = 8000; $a < count($file); $a++)
{
fwrite($open, $file[$a]);
}
fclose($open);
?>
Last edited by Gogeta70 on 27 Jul 2006, 08:42, edited 1 time in total.
¯\_(ツ)_/¯ It works on my machine...
- Nerdz
- The Architect
- Posts: 1127
- Joined: 15 Jun 2005, 16:00
- 19
- Location: #db_error in: select usr.location from sucko_member where usr.id=63;
- Contact:
He just gave you the receipt to do it. Just read
[ This will work on any language, pick-up the one you like]
Open your wordlist ( File s )
Create a new .txt file ( File x)
For ( int i = 8000; ! s.endOfFile ; i++)
x = s(i);
Close all file.
This should work imo
Ps: I think gogeta used this strategy.
[ This will work on any language, pick-up the one you like]
Open your wordlist ( File s )
Create a new .txt file ( File x)
For ( int i = 8000; ! s.endOfFile ; i++)
x = s(i);
Close all file.
This should work imo
Ps: I think gogeta used this strategy.
Give a man a fish, you feed him for one day.
Learn a man to fish, you feed him for life.
Learn a man to fish, you feed him for life.