web blazonry web development scripts and tutorials
 
Web blazonry.com
   Home       PHP       Name Generators       Perl       CSS       Javascript       Java       devTips       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)





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 Part 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
U.S. Name Generator
Baby Name Generator
Wu Name Generator
Popup Windows (JavaScript)
Intro to Web Databases (PHP, MySQL)
Upload and Resize an Image (PHP)
How To Install Apache + PHP + MySQL

Least Popular Pages
iNews Aplet (Java)
Java Resources)
Site Monitor (Perl)
Load Order of Images(Javascript)
 
 

  © 1997-2008. astonishinc.com   All Rights Reserved.