I have a file of the following structure:
#1552342335
ls
#1552342359
date
#1552342380
cat .bash_history 
i.e. timestamp followed by a text line. I want to process every timestamp line using shell's date (something like date -d ${1/\#/@} '+%F %T'), merge it with the next line and wrap with table tags, i.e. the output would be the following:
<tr> <td>2019-03-11 18:12:15</td> <td><pre>ls</pre></td> </tr>
<tr> <td>2019-03-11 18:12:39</td> <td><pre>date</pre></td> </tr>
<tr> <td>2019-03-11 18:13:00</td> <td><pre>cat .bash_history</pre></td> </tr>
I understand it would be something like awk 'NR % 2 {print | " <something here>" } !(NR % 2) {p=$0}' input_file - but I can't find the way to implement all the necessary transformations in one command.

dateprogram, and is probably 10 to 100 times faster.