Mime-Version: |
1.0 (Apple Message framework v915) |
Content-Type: |
text/plain; charset=US-ASCII; format=flowed; delsp=yes |
Date: |
Fri, 14 Dec 2007 10:21:03 -0500 |
Reply-To: |
|
Subject: |
|
From: |
|
In-Reply-To: |
|
Content-Transfer-Encoding: |
7bit |
Sender: |
|
Parts/Attachments: |
|
|
. matches a single character. It needs to be escaped in regular
expressions.
On Dec 14, 2007, at 8:27 AM, jeff donovan wrote:
> Greetings
>
> I have a regular expression I am having difficulty incorporating
> into an apple script
>
> I have a folder with a bunch of files labeled 1234. 1235. 1236 etc,..
> so I have been using this to delete only these files but leave the
> others alone;
>
> rm -f $( ls /Users/drfoo/scripts/HERE/Deleted\ Message | grep
> "[0-9]\.")
>
> the folder " deleted message " does have a space in the name, i
> can't change that. it's when i get to the digit period that apple
> script yells at me so then I'm forced to do this
>
> do shell script "rm -f $(ls " & folderPath & aName & "/deleted\\
> messages/ | grep [0-9]\\.)"
>
> this is not working . any hints?
>
> -j
>
> "A name indicates what we seek. An address indicates where it is.
> A route indicates how we get there."
>
> - RFC 791, Internet Protocol (September 1981), Editor: Jon Postel
>
|
|
|