web blazonry web development scripts and tutorials Get best price on Prepaid Cheapest Smartphone
   PHP       Name Generators       Perl       CSS       Javascript       Java       MySql       How Tos       Resources   

Perl Home

Perl Scripts
  Count Links
  Mail to MySQL
  ProcLog Files
  Search and Replace
  Site Monitor
  UnTabify

Perl Articles
  csv2htm Converter
  OLE Automation
  Regular Expressions
  SubDir Recursion

Perl Resources
  Regular Expressions Quick Reference
  Regular Expressions Examples
  Recommended Sites
  Bestselling Perl Books
  Free Perl Books (new)
  Free Python Books(new)

Bookmark and Share




Perl : Search and Replace

mksr    November 2000

mksr.pl is a script which allows you to search for and replace a string in multiple files. I am pretty sure there is probably already a UNIX tool to do this, but it was easier for me to roll my own then look up how to do it every time.

Usage:

mksr [find] [replace] [file]

File can be any filename or to use wildcards leave off the * and use just the ".ext"

For example to search and replace all NAME with NEWNAME in all html files in current directory. (recurse not implemented yet)

mksr NAME NEWNAME .html


Download Script: mksr_pl.txt


Related Links:
web blazonry Regular Expressions Article

 

Newest Pages
Test Google Ads Ver. 2
Free Linux Admin Books
Free Linux Books for Programmers
Free Books for Linux on the Desktop
Free PHP Books
Free JavaScript Books
Free Java Books - Advanced
Free Java Books - Basic
Free Perl Books
Free Python Books
Quote of the Day (PHP)
Debugging Part 2
How to Test Google Ads
Most Popular Pages
Baby Name Generator
U.S. Name Generator
Wu Name Generator
Popup Windows (JavaScript)
Upload and Resize an Image (PHP)
How To Install Apache + PHP + MySQL
Intro to Web Databases (PHP, MySQL)

Least Popular Pages
iNews Applet (Java)
Java Resources
Site Monitor (Perl)
PHP Resources
 
 

  privacy policy     ||     © 1997-2016. astonishinc.com   All Rights Reserved.