From: Michael Cheselka (cheselka@LINUX.CACTUS.ORG)
Date: Tue May 04 2004 - 18:33:01 EDT
Good script.
I would only add:
- - - - - snip - - - - -
#!/bin/sh
typeset -u FILE
for file in $@; do
FILE="${file}"
mv -i "${file}" "${FILE}"
done
- - - - - snip - - - - -
... and expect errors for attempts to rename files with
the same name or to the original file.
Is there a "--reply=no" option like the GNU "mv", or a way to use "yes n"?
On Sat, May 01, 2004 at 11:19:03AM -0400, Bill Thompson wrote:
> Here's one way (there are many):
>
> - - - - - snip - - - - -
> #!/bin/sh
>
> typeset -u UPPER
>
> for FILE in $@; do
> UPPER=$FILE
> mv $FILE $UPPER
> done
> - - - - - snip - - - - -
>
> Of course you may want to do some checking along the way, but that's the basic idea.
>
> Bill Thompson
> Sr UNIX Systems Administrator
> The Goodyear Tire & Rubber Co.
>
> Contains Confidential and/or Proprietary Information
> May Not Be Copied or Disseminated Without Express Consent of The Goodyear Tire & Rubber Company.
>
-- Michael R. M. Cheselka ryoohki@ryoohki.org Itsu Made Mo "Love & Peace" ryoohki@spymac.com http://www.cactus.org/~cheselka cheselka@cactus.org
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:53 EDT