[Nottingham] Is everyone "sed -e 's/.../.../ ...'" only?
Martin
martin at ml1.co.uk
Wed Aug 2 12:05:37 UTC 2017
On 02/08/17 12:22, Andy Smith via Nottingham wrote:
> Hello,
>
> On Tue, Aug 01, 2017 at 03:48:22PM +0100, Martin via Nottingham wrote:
>> Does anyone commonly use sed with anything other than just the "s"
>> (substitute) command?
>
> I used '/blah/d' yesterday to remove lines matching blah :)
But, but, but, but...
That is only shorthand for a 's/.*blah.*//' :-P
> Otherwise no I can't remember the last time I used sed without the
> s// command.
>
> tbh if it gets much more complicated than that I do it in perl.
>
> For the relative beginner:
>
> https://www.youtube.com/watch?v=IGe0GnlIWq4
I'm moving over to Python to move away from some of the 'looks like
transmission line noise' syndrome. Then again, for expressive freedom,
any regex is going to be one of either cryptic and terse or readable but
unwieldy...
Cue discussion of formats tomorrow night... ;-)
Thanks,
Martin
--
- ╔═══════════════════╦══════════════════════════════════════════╗
- ║ Martin Lomas ║ OpenPGP (GPG/PGP) Public Key: 0xCEE1D3B7 ║
- ║ martin@ ml1 co uk ║ Import from hkp://subkeys.pgp.net or ║
- ║ ----------------- ║ http:// ml1 .co .uk/martin_ml1_co_uk.gpg ║
- ╚═══════════════════╩══════════════════════════════════════════╝
More information about the Nottingham
mailing list