diff --git a/php/regRename.php b/php/regRename.php index 748dd10..b402b78 100644 --- a/php/regRename.php +++ b/php/regRename.php @@ -1,46 +1,47 @@ - Directories to look over - -p Define RegEx patterns - -r Rename file recursively - -s Strings that will replace the matches - - Optional: - -e Exclude defined pattern - -l Output log file - -t Test without modifying anything - - Example: - php regRename.php -d ~/ -p "/(.+)_.+/" -s "\\1" - - Result: - R File ".mysql_history" will be renamed to ".mysql" - R File ".db_pass" will be renamed to ".db" - R File ".bash_logout" will be renamed to ".bash" - R File ".mysql_pass" will be renamed to ".mysql" - R File ".bash_history" will be renamed to ".bash" - - php regRename.php -d ~/ -p "/(.+)_.+/" -s "\\1" - -__USAGE__ -) ; - -//------- End Usage ----------- - -$rrgr = new RegRename(); -Args::PARSE ( $argv, array($rrgr, 'setOption') ); -$rrgr->begin(); - - +#!/usr/bin/env php + Directories to look over + -p Define RegEx patterns + -r Rename file recursively + -s Strings that will replace the matches + + Optional: + -e Exclude defined pattern + -l Output log file + -t Test without modifying anything + + Example: + php regRename.php -d ~/ -p "/(.+)_.+/" -s "\\1" + + Result: + R File ".mysql_history" will be renamed to ".mysql" + R File ".db_pass" will be renamed to ".db" + R File ".bash_logout" will be renamed to ".bash" + R File ".mysql_pass" will be renamed to ".mysql" + R File ".bash_history" will be renamed to ".bash" + + php regRename.php -d ~/ -p "/(.+)_.+/" -s "\\1" + +__USAGE__ +) ; + +//------- End Usage ----------- + +$rrgr = new RegRename(); +Args::PARSE ( $argv, array($rrgr, 'setOption') ); +$rrgr->begin(); + +