-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 digits but when $(($(date +'%m
-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]*$(($(date +'%m')-1))-*
Run set -x before
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
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
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,
The files in one of my dir
-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 it was apache-2.0 - Php
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.
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 -exec du {}
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-Z,0-9
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 works the way I want it too:
find
{} \;
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 with a second /.
I think you want this:
find / -type d -maxdepth 1 -exec du
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 Perl programmers.
Or of course the cool
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 [^/] there...
13 matches
Mail list logo