[Nottingham] Howto delete chars from midway into lines of text?

Martin martin at ml1.co.uk
Thu May 6 12:46:49 UTC 2010


On 06/05/10 13:37, TJ wrote:
> sed 's/\("\)\([^",]*\)\("\)/\2/4' test.csv
> 
> Replace the final '4' with N.

Excellent!

That works a treat and is far better than counting characters...


Thanks for that.

Next is to work out how it works... :-)

The 'replace with 2nd positional parameter' is rather clever ;-)

Cheers,
Martin

-- 
----------------
Martin Lomas
martin at ml1.co.uk
----------------



More information about the Nottingham mailing list