Very Simple Program needed

Discussion in 'Programming' started by -whynot-, Jul 28, 2008.

  1. #1
    hi
    i need a program that load a .txt file in it and add a text which i tell to program and save the list to .txt like i load a file which contain:

    assa
    zssa
    vvss
    sfff

    and i tell the program add 900 to end of the .txt file and it give me


    assa900
    zssa900
    vvss900
    sfff900

    and it do it automaticly to all .txt file and let me save the file
    i would pay some $ via paypal to who can do it ,but i need it fast
    if any one can please pm or site pm me FAST!:eek:
     
    -whynot-, Jul 28, 2008 IP
  2. perlbone

    perlbone Peon

    Messages:
    128
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    get any text editor with regexp support, open your files one by one and apply the following regexp:
    search: (.{1,})
    replace: \1yourtext
    (on some editors you should put $1 instead of \1, or tick 'Use placeholders' checkbox.
    too many files? well, then look for mass files editor with regexp support..

    or.. just come to unix shell :)

    or.. code two .cmd files on windows, first one is to iterate through the files (see "loops", and "FOR /R in (%files)", after "set files=*.txt" especially), second one is to be started from first (CMD /C) receiving file name and output directory, and should loop thru all the lines giving a string added to each line and printing to the other directory and filename.

    or.. just install activeperl and do:
    perl -e '@files=<*.txt>; map {open f, ">$_"; my @l=<f>; map {$_="$_900"; print f $_} @l;} @files';
    ^ that's a program that you've wanted.

    That's not a programming that a scripting that should be done by each user manually :).
     
    perlbone, Jul 28, 2008 IP
  3. -whynot-

    -whynot- Banned

    Messages:
    355
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i pmed u , does n e other one know any thing about this?can any one write me a .exe prog or tell me what i do?or what program i use?
     
    -whynot-, Jul 28, 2008 IP
  4. -whynot-

    -whynot- Banned

    Messages:
    355
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    !!!!!!!!eelloo???
     
    -whynot-, Jul 28, 2008 IP
  5. -whynot-

    -whynot- Banned

    Messages:
    355
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    guys this project has been written.thanks alot from all!
     
    -whynot-, Jul 29, 2008 IP