[Date Prev][Date Next] [Thread Prev][Thread Next] [Thread Index] [Date Index] [Author Index]

*From*: Vikram Goyal <viki bol net in>*To*: Psyche <psyche-list redhat com>*Subject*: Bash pattern matching*Date*: Thu, 6 Feb 2003 19:39:09 +0530

Hello, The files in one of my dir are: . .. .aliases .aliases.sav attach dean inbox interesting lists .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-06 .log.2-01-11 .log.2-1-11 .log.2-1-12 .msgid.cache sent .tmp trash I want bash to match the following pattern in file listing but it dosen't do that. Can you point what I am doing wrong. ls Mail/.log\.[0-9]*$(($(date +'%y')-1))-[01]*$(($(date +'%m')-1))-* Output is: Mail/.log.02-01-11 Mail/.log.02-01-12 Mail/.log.02-01-13 The asterix is not being considered. Why the files .log.2-01-11 .log.2-1-11 .log.2-1-12 are not matched? Any solution... Thanks. -- vikram... <viki bol net in> |||||||| |||||||| ^^'''''^^||root||^^^'''''''^^ // \\ )) //(( \\// \\ // /\\ || \\ || / )) (( \\ -- Thus My Computer Chittered : ~~~~~~~~~~~~~~~~~~~~~~~~~~ A rope lying over the top of a fence is the same length on each side. It weighs one third of a pound per foot. On one end hangs a monkey holding a banana, and on the other end a weight equal to the weight of the monkey. The banana weighs two ounces per inch. The rope is as long (in feet) as the age of the monkey (in years), and the weight of the monkey (in ounces) is the same as the age of the monkey's mother. The combined age of the monkey and its mother is thirty years. One half of the weight of the monkey, plus the weight of the banana, is one forth as much as the weight of the weight and the weight of the rope. The monkey's mother is half as old as the monkey will be when it is three times as old as its mother was when she she was half as old as the monkey will be when when it is as old as its mother will be when she is four times as old as the monkey was when it was twice as its mother was when she was one third as old as the monkey was when it was old as is mother was when she was three times as old as the monkey was when it was one fourth as old as it is now. How long is the banana? -- ~|~ = Registered Linux User #285795

**Follow-Ups**:**Re: Bash pattern matching***From:*Tim Waugh