# |
Date |
Size |
|
Editor |
Comment |
Action |
78 |
2022-11-02 11:51:38 |
12732 |
to previous |
emanuele6 |
since 5.2: ${pat/a/"$rep"} needs quotes; use -- with perl; fix wrong replace() function: ${1+-i} => ${3+'-i'}; shift 2 doesn't shift at all if $#<2, use shift;shift or "${@:3}" instead |
view |
77 |
2022-08-23 09:33:58 |
12715 |
to previous |
emanuele6 |
simplify awk (the environment variables are always set, and even if they weren't it would not be a problem) |
view |
76 |
2022-08-21 21:43:48 |
12727 |
to previous |
emanuele6 |
fixup variable names |
view |
75 |
2022-08-21 21:38:10 |
12724 |
to previous |
emanuele6 |
pass variables to awk using environment variables instead of -v var="${var//'\'/'\\'}". it seems that nawk doesn't like strings containing newline as argument for -v, so that pe is not good enough |
view |
74 |
2022-01-23 08:45:10 |
12767 |
to previous |
emanuele6 |
unset => unset -v |
view |
73 |
2021-01-25 15:04:26 |
12764 |
to previous |
178 |
Add a way with confirmation using vim, grep, find. From bouncepaw2 at ya.ru |
view |
72 |
2020-12-04 01:25:18 |
12345 |
to previous |
GreyCat |
Promote the perl \Q solution above all others, because it's the only one that doesn't suck horribly. |
view |
71 |
2017-03-07 15:21:05 |
11089 |
to previous |
StephaneChazelas |
mention symlink issue remove minor as it's not minor, you may also no be able to reapply the same permissions. Also mention other possible metadata that people may overlook |
view |
70 |
2017-03-03 19:42:58 |
10965 |
to previous |
GreyCat |
discuss in-place editing vs temp file |
view |
69 |
2016-09-18 17:35:45 |
9453 |
to previous |
torland1-this |
Use case instead of test. Remove true and : and move condition into test of while loop |
view |
68 |
2016-09-18 17:24:34 |
9455 |
to previous |
torland1-this |
Also works with OpenBSD |
view |
67 |
2016-09-18 17:22:20 |
9446 |
to previous |
torland1-this |
|
view |
66 |
2016-06-16 00:39:52 |
9441 |
to previous |
chulak |
|
view |
65 |
2015-06-18 19:50:26 |
9442 |
to previous |
GreyCat |
The #pragma is screwing up numbers on the parent page. I think. |
view |
64 |
2015-04-28 21:00:54 |
9469 |
to previous |
GreyCat |
remove weird complicated perl example that is followed by a simpler example; fix the simpler one; add shell function wrapper for it |
view |
63 |
2014-01-14 14:41:41 |
9196 |
to previous |
geirha |
adding ./ in front of globs. Also, **/* is the same as ** |
view |
62 |
2014-01-13 21:49:56 |
9198 |
to previous |
xs |
Corrected a trio of copy-paste errors mentioning a bare "file" when no such thing exists. |
view |
61 |
2013-04-04 18:07:52 |
9211 |
to previous |
Lhunath |
|
view |
60 |
2013-04-04 18:06:12 |
9211 |
to previous |
Lhunath |
Add in `ex` examples since it's usually much simpler than `ed` |
view |
59 |
2013-03-12 20:00:17 |
8537 |
to previous |
74 |
ed is not the only POSIX editor |
view |
58 |
2012-08-12 19:11:59 |
8405 |
to previous |
e36freak |
the 'g' command should be used, otherwise ed will err if the re doesn't match anywhere in the file |
view |
57 |
2012-08-11 11:43:34 |
8365 |
to previous |
02dc1c5d |
|
view |
56 |
2012-07-18 15:48:02 |
8405 |
to previous |
e36freak |
|
view |
55 |
2012-07-18 15:43:13 |
8104 |
to previous |
e36freak |
change [[ to test in the sh function |
view |
54 |
2012-07-18 13:00:30 |
8100 |
to previous |
GreyCat |
some clean-up, if the page will fucking HOLD STILL long enough |
view |
53 |
2012-07-18 12:40:26 |
11531 |
to previous |
GreyCat |
STOP IT! |
view |
52 |
2012-07-18 12:36:38 |
1878 |
to previous |
Lhunath |
How about a link to ReplacingStrings? |
view |
51 |
2012-07-18 12:29:30 |
11531 |
to previous |
GreyCat |
It could use some trimming, but it's not all noise. |
view |
50 |
2012-07-18 09:20:05 |
1770 |
to previous |
Lhunath |
|
view |
49 |
2012-07-18 09:18:57 |
1770 |
to previous |
Lhunath |
Axe the noise. Nobody reading this FAQ cares about that. |
view |
48 |
2012-07-18 08:58:45 |
11531 |
to previous |
pgas |
move replacement in files first |
view |
47 |
2012-06-13 20:01:09 |
11579 |
to previous |
net66-219-41-161 |
Note use of $ENV{} to pass search and replacement strings into perl |
view |
46 |
2012-04-25 18:57:22 |
11290 |
to previous |
GreyCat |
add table of contents |
view |
45 |
2012-04-16 15:26:54 |
11240 |
to previous |
e36freak |
incorrect usafe for the POSIX search/rep function |
view |
44 |
2012-04-12 20:57:30 |
11240 |
to previous |
e36freak |
|
view |
43 |
2012-04-12 20:56:10 |
11186 |
to previous |
e36freak |
|
view |
42 |
2012-04-12 20:52:37 |
11176 |
to previous |
e36freak |
|
view |
41 |
2012-04-12 20:47:38 |
11140 |
to previous |
e36freak |
|
view |
40 |
2012-04-12 20:45:39 |
11100 |
to previous |
e36freak |
|
view |
39 |
2012-04-12 20:44:44 |
11104 |
to previous |
e36freak |
|
view |
38 |
2012-04-12 20:41:25 |
10843 |
to previous |
e36freak |
|
view |
37 |
2012-04-12 20:27:37 |
10842 |
to previous |
e36freak |
merging faq 110 (or at least the idea of it) |
view |
36 |
2011-11-04 19:17:14 |
4635 |
to previous |
GreyCat |
clarify question, un-indent examples, add find -exec + |
view |
35 |
2011-04-21 19:25:18 |
4698 |
to previous |
pool-72-81-225-126 |
|
view |
34 |
2011-04-21 19:23:03 |
4702 |
to previous |
pool-72-81-225-126 |
|
view |
33 |
2011-03-15 17:37:56 |
4698 |
to previous |
passionsfrucht |
,s/// causes an error when no lines match; hence using g, changing Q to q for not hiding errors (e. g. when the file could not be written). |
view |
32 |
2011-02-18 14:05:02 |
4681 |
to previous |
GreyCat |
much clean-up |
view |
31 |
2011-02-18 01:26:50 |
4642 |
to previous |
190-36-145-91 |
consistency |
view |
30 |
2011-02-18 00:48:35 |
4545 |
to previous |
190-36-145-91 |
quote space and shell char |
view |
29 |
2011-02-18 00:29:30 |
4541 |
to previous |
190-36-145-91 |
if the subject is ed(1), portability is relevant |
view |