penguin/utils

my env utils

commit e1a8fd4822a4d71c8676c4046a78b3aa3ce6c456

author斟酌 鵬兄 <tgckpg@gmail.com>
date2017-02-27T05:23:21Z
subjectCue interpreter for regRename
commit e1a8fd4822a4d71c8676c4046a78b3aa3ce6c456
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2017-02-27T05:23:21Z

    Cue interpreter for regRename
---
 php/regRename.php | 93 ++++++++++++++++++++++++++++---------------------------
 1 file changed, 47 insertions(+), 46 deletions(-)

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 @@
-<?php
-error_reporting ( E_ALL^E_NOTICE ) ;
-require_once dirname( __FILE__ ) . '/astropenguin/package.php';
-
-use astropenguin\botanical\RegRename;
-use astropenguin\botanical\Args;
-
-
-//----------- Usage -----------
-
-if ( !$argv[1] ) 
-	die (<<<__USAGE__
-Usage: php {$argv[0]} [options] [-d directory] [-p patterns] [-s "first match" "second" ...] [...args]
-
-  -d <paths>	Directories to look over
-  -p <patterns>	Define RegEx patterns
-  -r		Rename file recursively
-  -s <str ...>	Strings that will replace the matches
-
-  Optional:
-	-e <patterns>	Exclude defined pattern
-	-l <File>	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
+<?php
+error_reporting ( E_ALL^E_NOTICE ) ;
+require_once dirname( __FILE__ ) . '/astropenguin/package.php';
+
+use astropenguin\botanical\RegRename;
+use astropenguin\botanical\Args;
+
+
+//----------- Usage -----------
+
+if ( !$argv[1] ) 
+	die (<<<__USAGE__
+Usage: php {$argv[0]} [options] [-d directory] [-p patterns] [-s "first match" "second" ...] [...args]
+
+  -d <paths>	Directories to look over
+  -p <patterns>	Define RegEx patterns
+  -r		Rename file recursively
+  -s <str ...>	Strings that will replace the matches
+
+  Optional:
+	-e <patterns>	Exclude defined pattern
+	-l <File>	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();
+
+