ftp.nice.ch/pub/next/text/apps/SearchAndReplace.0.7.README

This is the README for SearchAndReplace.0.7.s.tar.gz [Download] [Browse] [Up]

Search and Replace (Rev 0.7 -- 5/94)
---------------------------

Search and Replace is a simple (but powerful) utility which gives one the ability to search an entire directory for the occurances of a string, and replace those occurrences with another string.  Furthermore, this directory can be traversed recursively, giving you the ability to do a search and replace operation on an entire sub-tree.

Other features include:
	-	The ability to include only those files with a specified extension
	 	(file type).
	-	The ability to exclude those files of a specified extension.
	-	The ability to rename the files based on the search and replace criteria given.
	-	The ability to make backup copies of the modified files
	
Use
-----
-	Enter the search string and the replace string in the fields provided
		- 	Neither string can contain the slash ('/') character
		-	The search string is case sensitive
-	Choose any combination of switches proveded
		-	Search and Replace of File Names
		-	Search and Replace of File Contents
		-	Perform selected operations on the entire sub-tree
		-	Make backup copies of the modified files
-	Select the directory you would like to start the search from
		-	Press the Search Directory button
		-	Select the directory from the open panel
-	If you have chosen to make backup copies, select the directory to copy to
		-	Press the Copy Backups To button
		-	Select the directory from the open panel
-	If you want to include all files in your search
		-	Select the exclude radio button
		-	Leave extensions blank (This is saying that you want to exclude
			nothing)
-	If you want to include or exclude a group of file types
		-	Select the appropriate include/exclude radio button
		-	Enter the extensions that you would like to include/exclude
-	Double check your settings
-	Press the Execute Button
-	The names of the modified files will be sent to standard output

Known Bugs:
------------------
- 	A slash (/) character cannot be contained within your search or replace strings.  If this is a character
	you would like to search on then you can modify the code so that the searching is based on another
	delimeter.  For example, to have the colon (:) character be used instead:
			Replace			sed 's/%s/%s/g'
			with				sed 's:%s:%s:g'
	within SearchAndReplace.m.
	
Disclaimers:
----------------
It should be immediately apparent that this can be a VERY destructive utility if care is not taken.  It is recommended that you backup any directory or sub-tree that you plan to operate on.

I haven't spent much time polishing or testing this utility, nor do I intend to.  I had only intended it for internal use within our company (NeuroDimension, Inc.), but then I figured that I might be able to save some people a little work by posting it.  If you find any bugs, send me email and I'll be glad to fix them.  If you think of enhancements that would be useful, add them in, put your name in the comments along with what you added, bump up the revision number, and re-submit it.  I realize the comments are non-existent, but the code is not very complex and there's not much of it there to figure out.
 
The contents of this submission are not warranted by NeuroDimension, Inc., Gary Lynn, or anyone else -- use at your own risk!!!


Gary Lynn

Please send comments and bug reports to:
gary@nd.com


Archive Location: /pub/next/sources/util

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.