Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

(Dermot) RE: Re: Removing files with extentions of log and date-time.

by Dermot (Scribe)
on Oct 08, 2000 at 21:14 UTC ( [id://35823]=note: print w/replies, xml ) Need Help??


in reply to Re: Removing files with extentions of log and date-time.
in thread Removing files with extentions of log and date-time.

We have a slight misunderstanding. I was speaking of the carets in the three regular expressions a little further down. The regular expressions that you use to select which files to delete. They need to be written without the caret as the text that you want to match is not at the start of the line.

In the grep statement you do need the caret. You need it because you want to exclude files that start with a fullstop (you probably call it a period). So, in the case of the grep you want to match:

  1. Start of line
  2. Followed by a fullstop
  3. Followed by anything at all

This is different from later on when you want to match:

  1. Anything at all. It might be start of line, it might not.
  2. Followed by a fullstop. This might be just after the start of line. Then again, it might be a few characters further along the string being matched against.
  3. Followed by the letter l, then the letter o, then the letter g.

Do you see the difference ?

  • Comment on (Dermot) RE: Re: Removing files with extentions of log and date-time.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://35823]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-25 10:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found