Closed Thread
Results 1 to 9 of 9




  

Thread: Need a script created

      
  1. #1
    Grand Masters Hurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of light
    Join Date
    April 19, 2008
    Location
    C:\\WTF\Unread\Posts
    Posts
    2,552
    Rep Power
    5
    Feedback Score
    0

    Default

    I need a script of some sort made in any language..

    What it needs to do is sort a .txt file list into txt files of 1000's.. there are about 300,000 lines of which needs to be grouped into each txt file having 1000..

    If anyone can make this free and quick I'd be greatful!

    Thanks!

    Can anyone PLEASE make me this?

    Ok guys, plz dont post unless you can make this script :x
    Last edited by Colleen; May 12th, 2008 at 7:06 pm.


  2. #2
    Grand Masters Colleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond repute Colleen's Avatar
    Join Date
    September 22, 2006
    Location
    Canada
    Posts
    11,144
    Rep Power
    26
    Feedback Score
    0

    Default Re: Need a script created

    Title changed, Hurley, please be more descriptive in the future.

    Kalina added 0 Minutes and 31 Seconds later...

    We're admins, we can post all we want, and in this case it's needed, how 'bout doing it right from the start next time?
    Last edited by Colleen; May 12th, 2008 at 7:01 pm. Reason: Automerged Doublepost

  3. #3
    Zap
    Zap is offline
    I Love Lesbians! Zap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond repute Zap's Avatar
    Join Date
    September 29, 2006
    Location
    Canada, Eh?
    Posts
    4,385
    Rep Power
    10
    Feedback Score
    0

    Default Re: Need a script created

    @Hurley: You posted a thread with a useless title in the wrong section. So, it was pointed out to you. No biggie. We all make mistakes. But, I find it funny that you only got the solution half right. You posted in the right section, but with the same dumb title, even after it was pointed out to you. The reason we're pointing this stuff out is to help YOU. If people can quickly understand what you're after, they're more apt to help.
    Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!

  4. #4
    Grand Masters Colleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond repute Colleen's Avatar
    Join Date
    September 22, 2006
    Location
    Canada
    Posts
    11,144
    Rep Power
    26
    Feedback Score
    0

    Default Re: Need a script created

    Report the thread next time, ask for it to be moved, DON'T make a duplicate.

  5. #5
    I'm New! chappi is on a distinguished road chappi's Avatar
    Join Date
    April 30, 2008
    Posts
    12
    Rep Power
    5
    Feedback Score
    0

    Default Re: Need a script created

    cat bigfile.txt | split --lines=1000 - outputfile_

  6. #6
    Grand Masters Colleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond reputeColleen has a reputation beyond repute Colleen's Avatar
    Join Date
    September 22, 2006
    Location
    Canada
    Posts
    11,144
    Rep Power
    26
    Feedback Score
    0

    Default Re: Need a script created

    Quote Originally Posted by chappi View Post
    cat bigfile.txt | split --lines=1000 - outputfile_
    Sorry but that really does not help anyone.

  7. #7
    Jedi Master JHalstead will become famous soon enoughJHalstead will become famous soon enoughJHalstead will become famous soon enough JHalstead's Avatar
    Join Date
    January 3, 2008
    Location
    OKC, OK - USA
    Posts
    147
    Rep Power
    5
    Feedback Score
    0

    Default Re: Need a script created

    Hurley4540, when you say any language what does that mean?

    I'm an omnimark developer and can write this in that language fairly quickly when I get off work. (Omnimark is a command line text transformation language in it's simplest form.)

    I could also write this in Python or DOT.Net (C#, VB.Net, ASP.NET)

    I just need to know what language you want to use. I know you said any, but I don't want to write something you'll have to download an interpreter for if you already have something installed.

    JHalstead added 48 Minutes and 9 Seconds later...

    Below you should find a python version of the script I think you're asking for.

    Code:
    #!/usr/bin/env python
    
    inputfile = open("readerfile.txt").read() # file to read from
    num = 1000 # number of lines for each output file
    curline = inputfile.split("\n")
    i = 0
    x = 1 
    for items in curline:
        open(str(x) + ".txt","a").write(items)
        if i != num - 1 : 
            open(str(x) + ".txt","a").write("\n")
        i = i + 1
        if i == num : 
            x = x + 1
            i = 0
    Just save as split.py and run at a command line with "python split.py" this will produce "1.txt, 2.txt, 3.txt, etc..." with 1000 lines per file. Wrote this well on break at work, let me know if it works for you...
    NOTE: edit inputfile path, second line in code
    Last edited by JHalstead; May 13th, 2008 at 11:53 am. Reason: Automerged Doublepost

  8. #8
    Grand Masters Hurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of lightHurley4540 is a glorious beacon of light
    Join Date
    April 19, 2008
    Location
    C:\\WTF\Unread\Posts
    Posts
    2,552
    Rep Power
    5
    Feedback Score
    0

    Default Re: Need a script created

    I got the program from an IRL friends, thanks anyway guys!


  9. #9
    The Force is Strong! Hostlayer is a jewel in the roughHostlayer is a jewel in the roughHostlayer is a jewel in the roughHostlayer is a jewel in the roughHostlayer is a jewel in the roughHostlayer is a jewel in the rough Hostlayer's Avatar
    Join Date
    April 8, 2008
    Posts
    374
    Rep Power
    5
    Feedback Score
    0

    Default Re: Need a script created

    He provided you with it above...

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Myspace Script for sale - Comment script
    By Steve in forum Scripts
    Replies: 2
    Last Post: Feb 17th, 2008, 7:31 pm
  2. Best script to use?
    By einsteinsboi in forum HTML & Website Design
    Replies: 10
    Last Post: Aug 14th, 2007, 7:40 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
WebTalkForums
WebTalkForums
Recent Forum Threads