Replace in files (CLI)

PHP skripty
User avatar
Ashus
Administrátor
Posts: 417
Joined: 07. 07. 2007 10:51
Location: Ostrava - Polanka nad Odrou
Contact:

Replace in files (CLI)

Postby Ashus » 08. 03. 2015 14:42

A CLI script that replaces strings in files - recursively in multiple directories.
Files are filtered by *.txt filesystem matching convention, optionally directories are recursively traversed.
A text is replaced with another one, case sensitive.

The advantage of this over sed is you don't have to enter escaped regexps and worry about the results and you also don't need to enter parameters, you are asked each time.
Attachments
replace-in-files.phpx
(1.56 KiB) Downloaded 8 times
Image
Coffee phreak!

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron