Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
CHGREP(1) FreeBSD General Commands Manual CHGREP(1)

chgrep - change oldpattern to newpattern

chgrep [-en/w] [-dhilqrsv] [-t filename] OLDPATTERN NEWPATTERN [file...]

Chgrep searches the input files (or standard input if no files are named) for oldstring and changes them to newstring. If some file and file.lock exist then chgrep leaves both files unchanged. You can write NEWPATTERN as "NULL" to clear OLDPATTERN, i.e. "chgrep oldstring NULL somefile.c".
Don't change modification times of altered files.
Print the version number of chgrep to standard output. This version number should be included in all bug reports (see below).
Ignore differences in case at OLDPATTERN.
Leaves copy of old file unchanged in filename.lock
Treat <newline> as a regular character.
Quiet mode (no output at all).
Read all files under each subdirectory, recursively.
Simulation mode.
Use not default file.lock for caching.
Prints to standard output diagnostic informations.
Doesn't recognize regexp in OLDPATTERN. This option accelerates the whole process. Incompatible with -e and/or -n.

Normally, exit status is 0 if no errors were found, and 1 if some errors were found. The -v option helps to understand the sense of the exit status.

Email bug reports to Be sure to include the word “chgrep” somewhere in the “Subject:” field.
2002/04/16 Project

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.