On 1/9/07, David Smiley  wrote:
I forgot to add, I log into a windows domain and so I can't set the case.
Perhaps this issue only relates to windows domain logins.  Maybe they are
case insensitive because when I log into the domain, I ALWAYS specify it in
lower case.  I don't think I've ever seen it presented to me (in Windows) as
upper case.  Yet in CYGWIN, $USER=DSMILEY.  If domain logins are case
*in*sensitive (appears likely), then it would seem to me that it should be
normalized to lower-case for use in CYGWIN.

$USER is a Windows environment variable and Cygwin doesn't change it.
It just reports what Windows says.

I disagree that Cygwin should normalize it to lower case by default.

You can do something creative with your logon process by sending the
variable to some shell script and having it fix the case.

I don't write bash scripts or awk so here is an example in perl.

=-=-=-=-=-=-=-=-=-=-=-=-= code =-=-=-=-=-=-=-=-=-=-=-=-=
#!/usr/bin/perl -w
$word = shift;
print " In: $word\n";
$word =~ s/([A-Z])/lc($1)/ge;
print "Out: $word\n";
=-=-=-=-=-=-=-=-=-=-=-=-= code =-=-=-=-=-=-=-=-=-=-=-=-=
Examples of output:
[EMAIL PROTECTED] ~
$ ./test3.pl DSmiley
In: DSmiley
Out: dsmiley
[EMAIL PROTECTED] ~
$ ./test3.pl DSMILEY
In: DSMILEY
Out: dsmiley
[EMAIL PROTECTED] ~
$ ./test3.pl dsmiley
In: dsmiley
Out: dsmiley
[EMAIL PROTECTED] ~
$

-Jason

--
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/

Reply via email to