Re: Bash pattern matching

2003-02-17 Thread Vikram Goyal
-Original Message- From: Vikram Goyal <[EMAIL PROTECTED]> Sent: Sun, Feb 16, 2003 at 05:34:54PM +0530 To RedhatList Subject: Re: Bash pattern matching > That's true. But see bash's behavior has changed since last time I > wrote my script. date +%m returns two dig

Re: Bash pattern matching

2003-02-16 Thread Vikram Goyal
-Original Message- From: "Todd A. Jacobs" <[EMAIL PROTECTED]> Sent: Thu, Feb 13, 2003 at 12:49:25PM -0800 To RedhatList Subject: Re: Bash pattern matching > On Thu, 13 Feb 2003, Vikram Goyal wrote: > > > ls Mail/.log\.[0-9]*$(($(date +'%y')-1))-[01

Re: Bash pattern matching

2003-02-15 Thread Cameron Simpson
On 18:19 13 Feb 2003, Vikram Goyal <[EMAIL PROTECTED]> wrote: | The files in one of my dir are: | ... .aliases .aliases.sav attach | dean inbox interestinglists .log.02-01-11 | .log.02-01-12 .log.02-01-13 .log.03-02-01 .log.03-02-02

Re: Bash pattern matching

2003-02-13 Thread Todd A. Jacobs
On Thu, 13 Feb 2003, Vikram Goyal wrote: > ls Mail/.log\.[0-9]*$(($(date +'%y')-1))-[01]*$(($(date +'%m')-1))-* Run "set -x" before running your command, so that you can see how bash is expanding your command line. My guess is that the files that aren't matching don't have enough digits in them

Re: Bash pattern matching

2003-02-13 Thread Vikram Goyal
-Original Message- From: Ronald Hermans <[EMAIL PROTECTED]> Sent: Thu, Feb 13, 2003 at 02:40:54PM +0100 To RedhatList Subject: RE: Bash pattern matching > Its is complaining about: > perl-DBI > perl_DBD-MySQL > perl(CGI) > perl(DBI) > Ya, Are you sure. I thought

RE: Bash pattern matching

2003-02-13 Thread Ronald Hermans
Its is complaining about: perl-DBI perl_DBD-MySQL perl(CGI) perl(DBI) > -Original Message- > From: Vikram Goyal [mailto:[EMAIL PROTECTED]] > Sent: donderdag 13 februari 2003 13:50 > To: RedhatList > Subject: Bash pattern matching > > > Hello All, > >

Bash pattern matching

2003-02-13 Thread Vikram Goyal
Hello All, The files in one of my dir are: . .. .aliases .aliases.sav attach dean inbox interestinglists .log.02-01-11 .log.02-01-12 .log.02-01-13 .log.03-02-01 .log.03-02-02 .log.03-02-03 .log.03-02-04 .log.03-02-05 .log.03-02

Re: pattern matching

2001-11-14 Thread dave brett
Thanks to all I will look into both books. david On Tue, 13 Nov 2001, Gordon Messmer wrote: > On Wed, 14 Nov 2001, Cameron Simpson wrote: > > > On Tue, Nov 13, 2001 at 02:48:07PM -0800, Gordon Messmer <[EMAIL PROTECTED]> wrote: > > | I think you want this: > > | find / -type d -maxdepth 1 -ex

Re: pattern matching

2001-11-13 Thread Gordon Messmer
On Wed, 14 Nov 2001, Cameron Simpson wrote: > On Tue, Nov 13, 2001 at 02:48:07PM -0800, Gordon Messmer <[EMAIL PROTECTED]> wrote: > | I think you want this: > | find / -type d -maxdepth 1 -exec du {} \; | egrep -v "/[^/]*/" > > You can make that even simpler: > /.*/ > No need to use [^/] t

Re: pattern matching

2001-11-13 Thread Cameron Simpson
ase point me in the direction for finding out how | > pattern matching works. | | Pick up any book on perl, or see any online tutorial on the language. | Since regular expressions are considered the "core" of the language, they | get a lot of attention and are explained very well to

Re: pattern matching

2001-11-13 Thread Gordon Messmer
-type d -maxdepth 1 -exec du -s {} \; I think that's what you're trying to do. > find / -type d -maxdepth 1 -exec du {} \; |grep "\/[a-z,A-Z,0-9]^[\/] > > The pattern matching did not work the way I expected it to. What I wanted > was it to reject all lines wit

Re: pattern matching

2001-11-13 Thread Wayne Vosberg
Your find is just fine. It's du that's traversing your subdirectories. Try: # find / -type d -maxdepth 1 -exec du -s {} \; On Tue, 13 Nov 2001 16:04:34 -0600 (CST) dave brett <[EMAIL PROTECTED]> wrote: > Pattern matching is drivingg me nuts. > > This command wo

pattern matching

2001-11-13 Thread dave brett
Pattern matching is drivingg me nuts. This command works the way I want it too: find / -type d -maxdepth 1 This does not find / -type d -maxdepth 1 -exec du {} \; It gave the size of all directories. So then I tried find / -type d -maxdepth 1 -exec du {} \; |grep "\/[a-z,A-