sciencewhiz
Diamond Member
use pre around the output of the command to preserve the linebreaks.
Originally posted by: sciencewhiz
use pre around the output of the command to preserve the linebreaks.
00,15,30,45 * * * * echo "<pre>"`/usr/local/bin/tw_cli /c0/u0 show`"</pre>" > /var/www/status.html
Originally posted by: Alone
00,15,30,45 * * * * echo "<pre>"`/usr/local/bin/tw_cli /c0/u0 show`"</pre>" > /var/www/status.html
EDIT: Ah, you got it.
Originally posted by: Alone
Echo isn't preserving the line breaks, it seems. Hm..
Originally posted by: GTaudiophile
Originally posted by: Alone
Echo isn't preserving the line breaks, it seems. Hm..
LOL. It's really just me being anal about formatting.
This really isn't worth people sweating over but the help is indeed appreciated 🙂
Originally posted by: Alone
Originally posted by: GTaudiophile
Originally posted by: Alone
Echo isn't preserving the line breaks, it seems. Hm..
LOL. It's really just me being anal about formatting.
This really isn't worth people sweating over but the help is indeed appreciated 🙂
Bah, it's a chance to learn. 😉
Originally posted by: Alone
Can you try it with the pre tags so I can see? I'm not sure I'm understanding properly.
Originally posted by: GTaudiophile
Is it possible to have three seperate commands write to the same HTML file?
echo `/usr/local/bin/tw_cli /c0/u0-0 show` > /var/www/status.html && echo `/usr/local/bin/tw_cli /c0/u0-1 show` >> /var/www/status.html
00,15,30,45 * * * * date > /var/www/status.html && `/usr/local/bin/tw_cli /c0/u0 show` >> /var/www/status.html
Originally posted by: Alone
Nice and clean.
Originally posted by: GTaudiophile
Nice.
I think I need more info on the HTML formatting part.