It's been some time since posting to the forum. I've been trying to find a solution in the bash or zsh programming language that would allow me to cat tables to files that later I could update with textual strings including info on time and dates, to keep track of tasks that I'm performing. In doing this I started looking into groff's tbl, which generates tables. I love groff but one of the issues I have with it is that it prints seven empty lines before the table and 53 empty lines after. This is the table.me file:
.TS
allbox;
c s s s
c c c c.
work hours
.TE
and my command for displaying this to the terminal is:
tbl Documents/tempdir/tmp18=.md| groff -me -T ascii
I'm running these commands inside a zsh shell on kitty terminal on a os x Majove 10.14.6
This is the output:
+--------------+
| work hours |
+--+---+---+---+
| | | | |
+--+---+---+---+
Why so much whitespace? why so many newlines? I tried pruning these lines with
tbl Documents/tempdir/tmp18=.md| groff -me -T ascii | sed -e 's/*[ ]*//'
Does groff always consistently produce so many newlines? I've experimented using head and tail to get the table isolated but my main problem with this method is while changing the table I also have to change the values of head and tail. Is there a way to get groff to print to stdout without this proceeding and post-ceeding empty lines?