Regular Expression Case Sensitivity

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: David Mandala
Date:  
Subject: Regular Expression Case Sensitivity
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C17D03.B4D9A1A0
Content-Type: text/plain;
    charset="iso-8859-1"


add an "a" to the command to see hidden files. What are hidden files you
ask, they are files that start with "."

so to see hidden files type "ls -a" or "ls -la"


Cheers,


Davidm

> -----Original Message-----
> From: Jim [mailto:farli@unitywave.com]
> Sent: Tuesday, December 04, 2001 1:09 PM
> To:
> Subject: Re: Regular Expression Case Sensitivity
>
>
> The 'rm' only asked me if i wanted to delete aaaa and bbbb,
> as it should.
> The really interesting thing that I found is that ls and ls-l
> never showed me
> the .abcd file.
>
>
> On Tuesday 04 December 2001 12:54, you wrote:
> > Try this in an empty directory and let me know if this is a bug or a
> > feature or an error on my part.
> >
> > Create several files of upper and lower case names:
> >
> >     touch aaaa
> >     touch AAAA
> >     touch bbbb
> >     touch BBBB
> >     touch 1234
> >     touch .abcd

> >
> > Now use a regular expression to delete all files starting
> with a lower case
> > letter:
> >
> >     rm [a-z]*

> >
> > When I was experimenting with this all of the files
> starting with *any*
> > alphabetic character were deleted. This was unexpected and
> I'm not sure if
> > I am misinterpreting the regular expression or if I am
> delusional. Let me
> > know what you get. FYI, I am using Red Hat Linux 7.2 so I would be
> > interested if it's just me.
> >
> > Brian
> > ________________________________________________
> > See http://PLUG.phoenix.az.us/navigator-mail.shtml if your
> mail doesn't
> > post to the list quickly and you use Netscape to write mail.
> >
> > PLUG-discuss mailing list -
> > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your
> mail doesn't post to the list quickly and you use Netscape to
> write mail.
>
> PLUG-discuss mailing list -
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>


------_=_NextPart_001_01C17D03.B4D9A1A0
Content-Type: text/html;
    charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: Regular Expression Case Sensitivity</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>add an &quot;a&quot; to the command to see hidden =
files. What are hidden files you ask, they are files that start with =
&quot;.&quot;</FONT>
</P>

<P><FONT SIZE=3D2>so to see hidden files type &quot;ls -a&quot; or =
&quot;ls -la&quot;</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Cheers,</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Davidm</FONT>
</P>

<P><FONT SIZE=3D2>&gt; -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>&gt; From: Jim [<A =
HREF=3D"mailto:farli@unitywave.com">mailto:farli@unitywave.com</A>]</FON=
T>
<BR><FONT SIZE=3D2>&gt; Sent: Tuesday, December 04, 2001 1:09 PM</FONT>
<BR><FONT SIZE=3D2>&gt; To: =
</FONT>
<BR><FONT SIZE=3D2>&gt; Subject: Re: Regular Expression Case =
Sensitivity</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; The 'rm' only asked me if i wanted to delete =
aaaa and bbbb, </FONT>
<BR><FONT SIZE=3D2>&gt; as it should.&nbsp; </FONT>
<BR><FONT SIZE=3D2>&gt; The really interesting thing that I found is =
that ls and ls-l </FONT>
<BR><FONT SIZE=3D2>&gt; never showed me </FONT>
<BR><FONT SIZE=3D2>&gt; the .abcd file.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; On Tuesday 04 December 2001 12:54, you =
wrote:</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Try this in an empty directory and let me =
know if this is a bug or a</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; feature or an error on my part.</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Create several files of upper and lower =
case names:</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &nbsp;&nbsp;&nbsp; touch aaaa</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &nbsp;&nbsp;&nbsp; touch AAAA</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &nbsp;&nbsp;&nbsp; touch bbbb</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &nbsp;&nbsp;&nbsp; touch BBBB</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &nbsp;&nbsp;&nbsp; touch 1234</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &nbsp;&nbsp;&nbsp; touch .abcd</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Now use a regular expression to delete all =
files starting </FONT>
<BR><FONT SIZE=3D2>&gt; with a lower case</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; letter:</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &nbsp;&nbsp;&nbsp; rm [a-z]*</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; When I was experimenting with this all of =
the files </FONT>
<BR><FONT SIZE=3D2>&gt; starting with *any*</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; alphabetic character were deleted.&nbsp; =
This was unexpected and </FONT>
<BR><FONT SIZE=3D2>&gt; I'm not sure if</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; I am misinterpreting the regular =
expression or if I am </FONT>
<BR><FONT SIZE=3D2>&gt; delusional.&nbsp; Let me</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; know what you get.&nbsp; FYI, I am using =
Red Hat Linux 7.2 so I would be</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; interested if it's just me.</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Brian</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; =
________________________________________________</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; See <A =
HREF=3D"http://PLUG.phoenix.az.us/navigator-mail.shtml" =
TARGET=3D"_blank">http://PLUG.phoenix.az.us/navigator-mail.shtml</A> if =
your </FONT>
<BR><FONT SIZE=3D2>&gt; mail doesn't</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; post to the list quickly and you use =
Netscape to write mail.</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; PLUG-discuss mailing list&nbsp; -&nbsp; =
</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; <A =
HREF=3D"http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss" =
TARGET=3D"_blank">http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-=
discuss</A></FONT>
<BR><FONT SIZE=3D2>&gt; =
________________________________________________</FONT>
<BR><FONT SIZE=3D2>&gt; See <A =
HREF=3D"http://PLUG.phoenix.az.us/navigator-mail.shtml" =
TARGET=3D"_blank">http://PLUG.phoenix.az.us/navigator-mail.shtml</A> if =
your </FONT>
<BR><FONT SIZE=3D2>&gt; mail doesn't post to the list quickly and you =
use Netscape to </FONT>
<BR><FONT SIZE=3D2>&gt; write mail.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; PLUG-discuss mailing list&nbsp; -&nbsp; =
</FONT>
<BR><FONT SIZE=3D2>&gt; <A =
HREF=3D"http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss" =
TARGET=3D"_blank">http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-=
discuss</A></FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C17D03.B4D9A1A0--