Mail Archives: cygwin/2005/04/01/17:59:14
On Fri, 1 Apr 2005, beau wrote:
> Greetings,
>
> I've got a whole bunch of directories and files, formerly on debian,
> burnt to CD, that XP will only see as ALLCAPS. I read the archived
> thread from February "insensitive case problem in latest cygwin"
> (http://sourceware.org/ml/cygwin/2005-02/msg00454.html) wherein I
> found:
>
> ------------------- BEGIN /usr/local/bin/mvv -------------------
> #!/bin/sh
> /bin/mv "${1%%/}" "${1%%/}-$$" && mv "${1%%/}-$$" "${2%%/}"
> -------------------- END /usr/local/bin/mvv --------------------
>
> Is this pretty much the final word at the moment?
I suppose it is. I'm still getting the "are the same file" failure
(which, BTW, only occurs with check_case:relaxed or check_case:adjust --
with check_case:strict the error is "Filename exists with different
case").
> I tried all the steps in Dave Korn's post, ren wasn't found, neither was
> move;
Note that Dave Korn was running all commands from the cmd shell (though he
claimed that "mv" worked for him from bash as well).
> mv got me the "both the same" failure. If Igor's snippet above *is* the
> last word, can someone maybe help me decipher it or maybe point me to a
> favorite bash tut to help bring me up to speed? I am pretty new to
> cygwin in particular and as yet none to snappy with shell scripting in
> general; all help appreciated.
This is in no way Cygwin-related. The above uses the standard Bash
pattern removal expansion (see the "Parameter Expansion" section in the
bash manpage), as well as the current process id ($$).
For those too lazy to look this up, the script renames the first file to
something unique, and then renames that to the second name. The pattern
removal is needed to allow trailing slashes (e.g. "mvv a/ b/").
HTH,
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -