![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
text duplicator?? help
hey guys,
Say u have a text file with lines: a b c d e f g h are there any programs that can duplicate this, say 10,000 times, so now ull have 10000 a's, 10k b's, 10k c's, etc. thanks
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
bump......
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
scriptmaster
Industry Role:
Join Date: May 2006
Location: Serbia
Posts: 5,237
|
PHP code
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
KNow of any?
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Just Du It
Industry Role:
Join Date: Feb 2004
Posts: 12,094
|
copy and paste 10,000x
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
bump.. come on
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
no program out there does this?
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
bump again..thanks
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
scriptmaster
Industry Role:
Join Date: May 2006
Location: Serbia
Posts: 5,237
|
PHP Code:
PHP Code:
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
bump again
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
Hey Bump People
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Registered User
Industry Role:
Join Date: Aug 2003
Location: QWEBEC Corporate Office
Posts: 7,124
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
that code has a lil problem.. my original file has 1,000 lines, and i wanna dupilicate it to X1000
How will that code work if your original text file is 1000 lines? I need code that can read from text file..
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
Ill pay someone to code this for me!
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
scriptmaster
Industry Role:
Join Date: May 2006
Location: Serbia
Posts: 5,237
|
PHP Code:
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
scriptmaster
Industry Role:
Join Date: May 2006
Location: Serbia
Posts: 5,237
|
Sorry
Sorry not that code , this is what you need
PHP Code:
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
wizzart how do i run this??
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
scriptmaster
Industry Role:
Join Date: May 2006
Location: Serbia
Posts: 5,237
|
Open you HTML editor and paste this last code and save file as test.php
Open notepad write some text and save file as txtfile.txt Upload that 2 files to your server and go to http://yoursite.com/test.php and you will see result. ;) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
script works ok bro.. except it doesnt line break..
Example i put in a b it returns text file as a b a b instead of a b a b
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
im probably asking for me too much but can this possible report the results in text file?
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
bump! can anyone help fix this errro
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 | |
scriptmaster
Industry Role:
Join Date: May 2006
Location: Serbia
Posts: 5,237
|
Quote:
PHP Code:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#23 |
scriptmaster
Industry Role:
Join Date: May 2006
Location: Serbia
Posts: 5,237
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#24 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
error with that last script.. it doesnt work, it just reports one LINE, and in source code all i say is <br />
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#25 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
nobody can fix this? ill pay
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#26 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
bump again
![]() ![]()
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#27 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
Got a dedicated server with ssh login? Create the following script and run it with "sh <scriptname>"
Code:
cp /dev/null output.txt for x in 0 1 2 3 4 5 6 7 8 9 do for y in 0 1 2 3 4 5 6 7 8 9 do for z in 0 1 2 3 4 5 6 7 8 9 do cat input.txt >> output.txt done done done (There's probably a better way to loop 1,000 times but I'm too lazy to figure it out) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#28 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Can you clarify what you want...
you have the following a b c d and you want 1000 lines of: a b c d Is that correct? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#29 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Also... Do you just need to do this once? have a standalone script to do this? replace a function in some existing code?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#30 | |
Confirmed User
Join Date: Mar 2006
Location: San Diego, CA
Posts: 1,421
|
Quote:
Code:
for x in `seq 0 999`; do cat input.txt >> output.txt; done ![]()
__________________
![]() Naughty America - Director of Technology It's a CELEBRATION bitches!! For the hottest content promote Naughty America! ![]() swish at naughtyamerica dot com | ICQ: 226 737 620 | See Who I Am At AdultWhosWho.com! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#31 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
hit me up, icq: 33385924 I'll hook it up for you for a few bucks...
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#32 |
Confirmed User
Join Date: Mar 2006
Location: San Diego, CA
Posts: 1,421
|
here's the php:
Code:
<?php $LINES = file("input.txt"); $fp = fopen("output.txt", "w"); for ( $i=0; $i<1000; $i++ ) { foreach ( $LINES as $LINE ) fwrite($fp, "$LINE"); } fclose($fp); ?>
__________________
![]() Naughty America - Director of Technology It's a CELEBRATION bitches!! For the hottest content promote Naughty America! ![]() swish at naughtyamerica dot com | ICQ: 226 737 620 | See Who I Am At AdultWhosWho.com! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#33 |
Confirmed User
Join Date: Dec 2007
Location: Chatsworth, CA
Posts: 1,964
|
sed and awk are made for this kind of thing. don't even need a program, can do it on the command line.
Hell, even vi can do that. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#34 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
eheh jesus nobody can get this right?
your script worked with 2 lines.. then i loaded 2000 lines to be duplicated 1000 times each, and it crapped out.. Doesnt work.. this is getting ridiculous
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#35 | |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
Quote:
sed and awk and vi.. wow makes lot of sense.. i got no clue what u mean buddy ![]()
__________________
_________________ I am the best ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#36 | |
scriptmaster
Industry Role:
Join Date: May 2006
Location: Serbia
Posts: 5,237
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |