Using sed
, how would I change Popeye
’s birthday to 11/14/46
? Assume you don’t know Popeye’s original birthday.
The input filename is datebook
, as follows:
Arthur Putie:923-835-8745:23 Wimp Lane, Kensington, DL 38758:8/31/69:126000
Popeye Sailor:156-454-3322:945 Bluto Street, Anywhere, USA 29358:3/19/35:22350
Jose Santiago:385-898-8357:38 Fife Way, Abilene, TX 39673:1/5/58:95600
I tried
sed ‘^\(/Popeye/s/[0-9]{5}\):/\1:11/14/46’ datebook
but it did not work.