thumper | anyone have sed foo? | 02:01 |
---|---|---|
thumper | of sed fu? | 02:01 |
* ibeardslee has used it | 02:02 | |
thumper | I want to replace some strings in a shed load of files in a whole pile of directories | 02:02 |
thumper | s/DEBUG:/DEBUG/g | 02:02 |
thumper | over a lot of files | 02:02 |
ibeardslee | ohhh .. something I've done(ish) | 02:02 |
snail | thumper: you want to use a perl one liner, which an in place option i believe | 02:04 |
thumper | perl is fine | 02:04 |
ibeardslee | for F in *.*; do sed -i s/DEBUG:/DEBUG/ $F; done | 02:04 |
ibeardslee | that should do all files in one directory | 02:04 |
thumper | ibeardslee: recursively over files? | 02:04 |
thumper | find . -name "*.py" | xargs ... ? | 02:04 |
lifeless | xargs -n1 ... | 05:11 |
ojwb | lifeless: there's no need for -n1 - all that'll serve to do is make it take longer... | 06:31 |
lifeless | ojwb: depends on your sed, I think :) | 06:36 |
ojwb | perhaps, i'd tend to use perl there myself, but I'm pretty sure GNU sed has been like that for some time | 06:39 |
=== Hogggs is now known as Hoggs | ||
Atamira | mornin | 18:57 |
ibeardslee | morning | 19:07 |
Atamira | beautiful day here today | 19:12 |
Atamira | ive been told it might be a tad windy down your way | 19:12 |
ibeardslee | beautiful and still at the moment .. forgot to bring the camera into get a photo of the pÅhutakawa I can see out the window | 19:17 |
ibeardslee | it looks even more stunning with the blue sky int he background and the sun bringing out the red and gree | 19:18 |
ajmitch | morning | 19:20 |
snail | howdy all | 20:31 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!