public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* upper/lower case question
@ 1997-10-12 21:25 John Mamer
  1997-10-13 19:00 ` Charles Curley
  0 siblings, 1 reply; 7+ messages in thread
From: John Mamer @ 1997-10-12 21:25 UTC (permalink / raw)
  To: gnu-win32

Hi!
  Another newbie question:  I have a bunch of files,
originally written under UNIX, that have arrived at my
gnu-win32 directory via DOS (am running on Windows NT
4.0-sp3).  The problem is that in the process the file names
have all been translated to upper case.  I tried the obvious
thing: 

cp FILE.C file.c

but it didn't work.  I wound up reading each file into
emacs, and then copying it into a new directory using the
lower case name.  This worked, but it seems, somehow,
inelegant.  

I know that this is the result of a DOS/UNIX
incompatibility, and not strictly speaking gnu-win32's
fault, but is there a neater way to do this? (I anticipate
having to do this in the future).
thanks
j.


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: upper/lower case question
  1997-10-12 21:25 upper/lower case question John Mamer
@ 1997-10-13 19:00 ` Charles Curley
  1997-10-15  7:51   ` Lassi A. Tuura
  0 siblings, 1 reply; 7+ messages in thread
From: Charles Curley @ 1997-10-13 19:00 UTC (permalink / raw)
  To: John Mamer; +Cc: gnu-win32

At 09:25 PM 10/12/97 -0700, John Mamer wrote:
>Hi!
>  Another newbie question:  I have a bunch of files,
>originally written under UNIX, that have arrived at my
>gnu-win32 directory via DOS (am running on Windows NT
>4.0-sp3).  The problem is that in the process the file names
>have all been translated to upper case.  I tried the obvious
>thing: 
>
>cp FILE.C file.c
>
>but it didn't work.  I wound up reading each file into
>emacs, and then copying it into a new directory using the
>lower case name.  This worked, but it seems, somehow,
>inelegant.  
>
>I know that this is the result of a DOS/UNIX
>incompatibility, and not strictly speaking gnu-win32's
>fault, but is there a neater way to do this? (I anticipate
>having to do this in the future).
>thanks

Quick & dirty (from BASH):

mv FILE.C foo.c; mv foo.c file.c

You can probably put together a quick alias to do that in one command.

A little more development would be a perl script to do the same for the
entire directory or tree.


		-- C^2

Looking for fine software and/or web pages?
http://web.idirect.com/~ccurley
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: upper/lower case question
  1997-10-13 19:00 ` Charles Curley
@ 1997-10-15  7:51   ` Lassi A. Tuura
  0 siblings, 0 replies; 7+ messages in thread
From: Lassi A. Tuura @ 1997-10-15  7:51 UTC (permalink / raw)
  To: gnu-win32

Charles Curley wrote:
> Quick & dirty (from BASH):
> 
> mv FILE.C foo.c; mv foo.c file.c

The following script might also work, although you may have to do `mv'
twice:

for f in $*; do
  new="`echo $f | tr '[:upper:]' '[:lower:]'`"
  [ "$f" = "$new" ] || mv $f $new || exit 1
done

Surprisingly enough, it converts all arguments file names from upper
case to lower case :-)  If you call this script `lc', then invoking it
with `lc *' will lowercase all files in a directory.

//lat
-- 
Lassi.Tuura@cern.ch          There's no sunrise without a night
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: upper/lower case question
@ 1997-10-13 10:17 Earnie Boyd
  0 siblings, 0 replies; 7+ messages in thread
From: Earnie Boyd @ 1997-10-13 10:17 UTC (permalink / raw)
  To: jmamer; +Cc: gnu-win32

>Date: Mon, 13 Oct 1997 08:01:08 -0700 (PDT)
>From: John Mamer <jmamer@anderson.ucla.edu>
>To: Earnie Boyd <earnie_boyd@hotmail.com>
>Subject: Re: upper/lower case question
>
---snip---
>
>I've gotten a bunch of suggestions for how to unzip them in
>lower case.  I'm still curious why "cp FILENAME filename"
>doesn't work.  I thought maybe I'd set one of the parameters
>wrong in the mount command........
>
---snip---

The reason "cp FILENAME filename" is because to the root filesystem 
(MSDOS) they are the same file and you can't copy a file onto itself.

-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: upper/lower case question
@ 1997-10-13  5:16 Earnie Boyd
  0 siblings, 0 replies; 7+ messages in thread
From: Earnie Boyd @ 1997-10-13  5:16 UTC (permalink / raw)
  To: jmamer; +Cc: gnu-win32

How were the files transfered?  Was it a gzip file, tar file, zip file, 
or diskette copy?  In general I've found that filenames tend to keep 
their case.  However MSDOS on W95 and WNT have two filenames a short 
file name which is always in UPPERCASE and a long filename which is in 
whatever case the filename was created in.

-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------

>Date: Sun, 12 Oct 1997 21:25:13 -0700 (PDT)
>From: John Mamer <jmamer@anderson.ucla.edu>
>To: gnu-win32@cygnus.com
>Subject: upper/lower case question
>
>Hi!
>  Another newbie question:  I have a bunch of files,
>originally written under UNIX, that have arrived at my
>gnu-win32 directory via DOS (am running on Windows NT
>4.0-sp3).  The problem is that in the process the file names
>have all been translated to upper case.  I tried the obvious
>thing: 
>
>cp FILE.C file.c
>
>but it didn't work.  I wound up reading each file into
>emacs, and then copying it into a new directory using the
>lower case name.  This worked, but it seems, somehow,
>inelegant.  
>
>I know that this is the result of a DOS/UNIX
>incompatibility, and not strictly speaking gnu-win32's
>fault, but is there a neater way to do this? (I anticipate
>having to do this in the future).
>thanks
>j.
>
>
>-
>For help on using this list (especially unsubscribing), send a message 
to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>




______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: upper/lower case question
@ 1997-10-13  5:07 Earnie Boyd
  0 siblings, 0 replies; 7+ messages in thread
From: Earnie Boyd @ 1997-10-13  5:07 UTC (permalink / raw)
  To: jmamer; +Cc: gnu-win32

How were the files transfered?  Was it a gzip file, tar file, zip file, 
or diskette copy?  In general I've found that filenames tend to keep 
their case.  However MSDOS on W95 and WNT have two filenames a short 
file name which is always in UPPERCASE and a long filename which is in 
whatever case the filename was created in.

-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------

>Date: Sun, 12 Oct 1997 21:25:13 -0700 (PDT)
>From: John Mamer <jmamer@anderson.ucla.edu>
>To: gnu-win32@cygnus.com
>Subject: upper/lower case question
>
>Hi!
>  Another newbie question:  I have a bunch of files,
>originally written under UNIX, that have arrived at my
>gnu-win32 directory via DOS (am running on Windows NT
>4.0-sp3).  The problem is that in the process the file names
>have all been translated to upper case.  I tried the obvious
>thing: 
>
>cp FILE.C file.c
>
>but it didn't work.  I wound up reading each file into
>emacs, and then copying it into a new directory using the
>lower case name.  This worked, but it seems, somehow,
>inelegant.  
>
>I know that this is the result of a DOS/UNIX
>incompatibility, and not strictly speaking gnu-win32's
>fault, but is there a neater way to do this? (I anticipate
>having to do this in the future).
>thanks
>j.
>
>
>-
>For help on using this list (especially unsubscribing), send a message 
to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>




______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: upper/lower case question
@ 1997-10-13  1:45 Sergey Okhapkin
  0 siblings, 0 replies; 7+ messages in thread
From: Sergey Okhapkin @ 1997-10-13  1:45 UTC (permalink / raw)
  To: gnu-win32, 'John Mamer'

John Mamer wrote:
> 4.0-sp3).  The problem is that in the process the file names
> have all been translated to upper case.  I tried the obvious
> thing: 
> 
> cp FILE.C file.c
> 
> but it didn't work.  I wound up reading each file into

mv FILE.C file.c works fine.

-- 
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job.


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1997-10-15  7:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-12 21:25 upper/lower case question John Mamer
1997-10-13 19:00 ` Charles Curley
1997-10-15  7:51   ` Lassi A. Tuura
1997-10-13  1:45 Sergey Okhapkin
1997-10-13  5:07 Earnie Boyd
1997-10-13  5:16 Earnie Boyd
1997-10-13 10:17 Earnie Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).