|
|
Views
Edit history
changed:
-
Perls of Wisdom Camp
Here is a place to share some of your tricks and tips about perl.
Q: I need to change same pattern in a lot of files. I need to change this pattern: *!https://web* to *../../..*
A: perl makes this drop dead easy::
perl -pi -e's(!https://web)(../../..)g' *.html
-p:*p*rint each line
-i:perform an *i*nplace edit
-e:*e*xecute the following argument as the command/script
s/target/replacement/flags:*s*earch and replace
!https//web:the target string *(ed: yes i am aware of the lack of a colon. wiki limitation, forgive me)*
../../..:the replacement string
g:*g*lobal replacement, find each occurence on the line.
-john 2003-01-25T01:39:33-0800
|
|
«
|
August
2008
|
»
|
| Su |
Mo |
Tu |
We |
Th |
Fr |
Sa |
|
|
|
|
|
1 |
2 |
| 3 |
4 |
5 |
6 |
7 |
8 |
9 |
| 10 |
11 |
12 |
13 |
14
|
15 |
16 |
| 17 |
18 |
19 |
20 |
21 |
22 |
23 |
| 24 |
25 |
26 |
27 |
28 |
29 |
30 |
| 31 |
|
|
|
|
|
|
|