From fb0380f48203a11584773f3db335eaadd9cc6fdf Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Nov 2011 11:23:55 -0500 Subject: This zip file was identified as ltshell-3.5.zip --- shell/bin/mv.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 shell/bin/mv.php (limited to 'shell/bin/mv.php') diff --git a/shell/bin/mv.php b/shell/bin/mv.php new file mode 100644 index 0000000..8fc35cd --- /dev/null +++ b/shell/bin/mv.php @@ -0,0 +1,22 @@ +2) { + $dest = array_pop($args); + if (!is_dir($dest) { + echo $me.': dest must be a directory: `'.$dest."'\n"; + return 1; + } + foreach ($args as $src) { + rename($src,$dest.'/'.basename($src)); + } + } elseif (count($args)==2) { + rename($args[0],$args[1]); + } else { + echo 'Usage: '.$me." SOURCE [SOURCE2 [SOURCE3 ...]] DEST\n"; + return 1; + } + } +} + -- cgit v1.2.3-2-g168b