<html><head></head><body>OP said nothing of CGI... That is your own constraint. <br>
-- <br>
Sent from my Android phone with K-9 Mail. Please excuse my brevity.<br><br><div class="gmail_quote">Yaron <tclug@freakzilla.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre style="white-space: pre-wrap; word-wrap:break-word; font-family: sans-serif">SED can't be a CGI script though. And like I said, this is simplifying. My <br />CGI scripts usually do a bunch more, but I typed up the part that's <br />relevant.<br /><br />On Sat, 14 Jul 2012, Eric Crist wrote:<br /><br />> Using perl for THIS is silly. sed can do everything you'er doing with perl.<br />><br />> -----<br />> Eric F Crist<br />><br />><br />><br />> On Jul 14, 2012, at 22:03:01, Yaron wrote:<br />><br />>> I use perl GCI for this kind of stuff all the time. Basically make your html file (lets call it file.html) and put a marker in there, like %%MD5SUM%% or something. Then your CGI does this:<br />>><br />>> #!/usr/bin/perl<br />>> $|=1;<br />>> $file="file.html";<br />>> chomp($md5=`md5sum direct.tar.bz2`);<br />>><br />>> open(F, $file);<br />>> while(<F>) {<br />>>
s/%%MD5SUM%%/$md5/ if (/%%MD5SUM%%/);<br />>> print;<br />>> }<br />>><br />>> close (F);<br />>> exit(0);<br />>><br />>> That's extremely simplified with no full paths or strict mode or error checking, but you get the idea.<br />>><br />>> On Sat, 14 Jul 2012, Brian Wood wrote:<br />>><br />>>> I'm wondering how to automate something further. Currently I<br />>>> use the following commands (in a script) when I publish a<br />>>> new version of the software.<br />>>> md5sum direct.tar.bz2 | tee md5checksum<br />>>> cat md5checksum | xclip -sel clip<br />>>> After that I edit an html file by hand and paste the new<br />>>> checksum into the file. Once in a while I forget to do that<br />>>> step. So I'd like to figure out how to improve the process.<br />>>> What do you suggest? Thanks in advance.<br />>>> Shalom,<br
/>>>> Brian Wood<br />>>> Ebenezer Enterprises<br />>>> <a href="http://webEbenezer.net">http://webEbenezer.net</a><br />>>><br />>><br />>><br />>> -Yaron<br />>><br />>><hr /><br />>> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br />>> tclug-list@mn-linux.org<br />>> <a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list">http://mailman.mn-linux.org/mailman/listinfo/tclug-list</a><br />><br />><br /><br /><br />-Yaron<br /><br />--<br /><hr /><br />TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br />tclug-list@mn-linux.org<br /><a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list">http://mailman.mn-linux.org/mailman/listinfo/tclug-list</a><br /></pre></blockquote></div></body></html>