hello John, On Sat, Jul 25, 2020 at 02:57:13PM +1000, John Gardner wrote: > > > > also: i need "sed '/^$/q'" at the end of my filter because groff > > renders a lot of empty lines at the end of the output whenever i > > use b in my tbl format. i don't know how to remove it.
> sed -e :a -e '/^\n*$/{$d;N;};/\n$/ba' thanks for this answer, however my attempt was to remove the sed command itself. > sed -e :a -e '/^\n*$/{$d;N;};/\n$/ba' i have to admit i had to split it so i can read it sed ' :a /^\n*$/ { $d N }; /\n$/ba ' and yet i'm confused: can you explain the benefit of it over my simple and working sed '/^$/d' ? regards marc