I need a Find & Replace perl script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Argoz
    Confirmed User
    • Aug 2002
    • 3006

    #1

    I need a Find & Replace perl script

    I need to change all my ARS codes on my server.

    Any suggestion for a good perl script to do the job?
    rssEVOLUTION : Produce a FULL website with ANY RSS feed(s) in seconds.

    contentSOLUTION : Allowing you to automatically grab articles from article directories,
    import as many text files as you want at once, grab ANY content from ANY RSS feed, and scrape search engines, instantly.
  • grumpy
    Too lazy to set a custom title
    • Jan 2002
    • 9870

    #2
    you can do it with php
    Don't let greediness blur your vision | You gotta let some shit slide
    icq - 441-456-888

    Comment

    • SMG
      Confirmed User
      • Aug 2003
      • 1798

      #3
      I can code something like this in php real fast ...

      Also, if you have dreamweaver, it has a find and replace tool on it that will work on whole directories ...
      TGP Webmasters: sign up for the top 100 tgp list!
      Submit galleries
      If you add me to icq (title) make sure to mention GFY or I'll think you're a bot and deny you.

      Comment

      • Rorschach
        So Fucking Banned
        • Aug 2002
        • 5579

        #4
        just use sed, much easier

        Comment

        • Pun
          Confirmed User
          • Oct 2003
          • 379

          #5
          You don't even need perl to do that, although it's certainly possible. I don't know exactly how your file structure is, so I don't know if this solution works for you, but it's how I'd do it.

          ----------------------
          #!/bin/bash
          for i in *
          do
          cat $i | sed 's/old_ars_code/new_ars_code/g' > .tmpabc123
          mv .tmpabc123 $i
          done
          ----------------------

          That just goes through all files in a given directory and replaces "old_ars_code" with "new_ars_code".
          Not perl, but it's probably just as fast (if not faster) and it's simple.

          -Pun
          TrafficHolder.com - Buy/Sell Adult Traffic
          ICQ: 18771941

          Comment

          • Argoz
            Confirmed User
            • Aug 2002
            • 3006

            #6
            bump
            rssEVOLUTION : Produce a FULL website with ANY RSS feed(s) in seconds.

            contentSOLUTION : Allowing you to automatically grab articles from article directories,
            import as many text files as you want at once, grab ANY content from ANY RSS feed, and scrape search engines, instantly.

            Comment

            Working...