Looking for a programmer to do THIS for me...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • buddyjuf
    • Jul 2026

    #1

    Looking for a programmer to do THIS for me...

    Hey guys,
    I need a script that will look in a text file for all the 7 letter lines and put them on another text file.

    budget --> 20-25$

    thanx in advance guys!
  • NetRodent
    Confirmed User
    • Jan 2002
    • 3985

    #2
    Save your money. The following should do what you want. I didn't try running it so there may be typos.

    Code:
    $input_file = '/path/to/input/file';
    $output_file = '/path/to/output/file';
    
    open(I,"<$input_file") || die "Cannot read $input_file: $!\n";
    open(O,">$output_file") || die "Cannot write $output_file: $!\n";
    while(<I>) {
       chomp;
       $_ =~ s/^\s+//;
       $_ =~ s/\s+$//;
       if(length($_) hahahaha 7) {
          print O $_."\n";
       }
    }
    close I;
    close O;
    Last edited by NetRodent; 07-31-2003, 04:17 PM.
    "Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats."
    --H.L. Mencken

    Comment

    • hudson
      Confirmed User
      • Jul 2003
      • 2948

      #3
      line 7:

      if(length($_) hahahaha 7) {

      what does "hahahaha 7" mean?

      Comment

      • chowda
        Confirmed User
        • Jun 2003
        • 9527

        #4
        j script
        Someone finds you...
        2007

        PS: Nationalnet is the best host I've ever had. And i tried alot of them.

        Comment

        • fiveyes
          Confirmed User
          • Aug 2001
          • 1680

          #5
          Originally posted by hudson
          line 7:

          if(length($_) hahahaha 7) {

          what does "hahahaha 7" mean?
          2 equal signs ( "= =" without the space) make for a "hahahaha", for some reason.
          <CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

          <FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>

          Comment

          • SpaceAce
            Confirmed User
            • Jul 2002
            • 6493

            #6
            Originally posted by hudson
            line 7:

            if(length($_) hahahaha 7) {

            what does "hahahaha 7" mean?
            It's two equals signs together.

            = =

            SpaceAce

            Comment

            • buddyjuf

              #7
              hi netrodent, can you please contact me?

              thanx in advance

              Comment

              • AssFairy
                Confirmed User
                • Jun 2003
                • 674

                #8
                I can code you an exe that runs on your own puter to do this for free, got any examples of the text you wan't filtering?

                It would only take a few mins to write
                I sale lube

                Comment

                • hudson
                  Confirmed User
                  • Jul 2003
                  • 2948

                  #9
                  Thanks guys for explaining to me about the two equal signs, and nice bit of code there NetRodent

                  Comment

                  • buddyjuf

                    #10
                    Originally posted by AssFairy
                    I can code you an exe that runs on your own puter to do this for free, got any examples of the text you wan't filtering?

                    It would only take a few mins to write
                    hey assfairy! a EXE would be great! as long as it doesnt infect my computer

                    please contact me

                    Comment

                    • m4tt
                      So Fucking Banned
                      • May 2003
                      • 384

                      #11
                      come on people... basic stuff

                      PHP Code:
                      <?php
                      
                          $output = array();
                          $handle = @fopen("text.txt", "r");
                          
                              while(!feof($handle))    {
                                  $buffer = @fgets($handle, 4096);
                                  $buffer = trim($buffer);
                                  
                                  if (strlen($buffer) hahahaha 7)    {
                                      $output[] = $buffer;
                                  }
                              }
                              
                          @fclose($handle);
                          
                          $new_handle = @fopen("output.txt", "a")or die("Could not create new file.");
                          
                              for ($i = 0; $i < count($output); $i++)    {
                                  @fwrite($new_handle, $output[$i] . "\n");
                              }
                          
                          @fclose($new_handle);
                      ?>

                      Comment

                      • buddyjuf

                        #12
                        Originally posted by m4tt
                        come on people... basic stuff

                        PHP Code:
                        <?php
                        
                            $output = array();
                            $handle = @fopen("text.txt", "r");
                            
                                while(!feof($handle))    {
                                    $buffer = @fgets($handle, 4096);
                                    $buffer = trim($buffer);
                                    
                                    if (strlen($buffer) hahahaha 7)    {
                                        $output[] = $buffer;
                                    }
                                }
                                
                            @fclose($handle);
                            
                            $new_handle = @fopen("output.txt", "a")or die("Could not create new file.");
                            
                                for ($i = 0; $i < count($output); $i++)    {
                                    @fwrite($new_handle, $output[$i] . "\n");
                                }
                            
                            @fclose($new_handle);
                        ?>
                        Warning: feof(): supplied argument is not a valid stream resource in /home/bdjuf/public_html/a.php on line 6

                        Comment

                        • NetRodent
                          Confirmed User
                          • Jan 2002
                          • 3985

                          #13
                          Originally posted by NetRodent
                          Save your money. The following should do what you want. I didn't try running it so there may be typos.

                          Code:
                          $input_file = '/path/to/input/file';
                          $output_file = '/path/to/output/file';
                          
                          open(I,"<$input_file") || die "Cannot read $input_file: $!\n";
                          open(O,">$output_file") || die "Cannot write $output_file: $!\n";
                          while() {
                             chomp;
                             $_ =~ s/^\s+//;
                             $_ =~ s/\s+$//;
                             if(length($_) hahahaha 7) {
                                print O $_."\n";
                             }
                          }
                          close I;
                          close O;
                          Bah! The html filter strikes again. The "while() {" statement above should actually be "while(&lt;I&gt;) {".
                          "Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats."
                          --H.L. Mencken

                          Comment

                          • ryph
                            Confirmed User
                            • Oct 2002
                            • 1225

                            #14
                            mang, if ya still need this, aim: wreck3d
                            tom at ryphs dot com

                            Comment

                            • AssFairy
                              Confirmed User
                              • Jun 2003
                              • 674

                              #15
                              Originally posted by bdjuf


                              hey assfairy! a EXE would be great! as long as it doesnt infect my computer

                              please contact me
                              I don't do that kiddy shit, you can have uncompiled source code if you want and compile it yourself.

                              Post me an example of the text to [email protected] with a brief explanation of how you want to filter the text and I'll make you a program to do it.
                              I sale lube

                              Comment

                              • buddyjuf

                                #16
                                hey guys
                                netrodent helped me with the script and its working now

                                thank you all of you

                                Comment

                                • AssFairy
                                  Confirmed User
                                  • Jun 2003
                                  • 674

                                  #17
                                  Originally posted by bdjuf
                                  hey guys
                                  netrodent helped me with the script and its working now

                                  thank you all of you
                                  I sale lube

                                  Comment

                                  • Rui
                                    web
                                    • Dec 2001
                                    • 9533

                                    #18
                                    netrodent - care to share the goods (once again) ;) ?

                                    Comment

                                    Working...