some kind of binary sed(1) command

Matthias Apitz guru at
Thu Feb 2 06:22:42 UTC 2012


I have a normal ASCII file wich has in some places two lines of '*',
separated by an empty line, i.e.


and I want to substitute the \n between the star lines by \f; the
'binary' sed command would just be 


which ofc does not work with sed(1) because it is line oriented;
I could write something in perl, C, awk or whatever language, but I
would prefer to do it with the normal commands... any ideas?


Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <guru at> - w
UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5

More information about the freebsd-questions mailing list