<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>And a wellylug equivalent to the perlmongers solution by Grant for selecting a random package on a Debian based Linux system:-)<br></span></div><div><br></div><div>dpkg --get-selections | tail -n `rand -M \`dpkg --get-selections | wc -l\`` | head -1</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">I figured you should be able to do this with common Linux commands, without resorting to a programming or scripting language.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">This is one way...<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent;
 font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">If I thought about it a bit more I figure awk could probably do this a bit more elegantly, if not even more arcanely!.<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">Brent<br></div>  <div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font
 face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Grant McLean <grant@mclean.net.nz><br> <b><span style="font-weight: bold;">To:</span></b> wellylug@lists.wellylug.org.nz <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, February 12, 2014 3:50 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [wellylug] If you are stuck for ideas for a lightning talk session<br> </font> </div> <div class="y_msg_container"><br>Presumably the WellyLUG session on Monday will take a relaxed approach<br clear="none">to the five minute time limit (as the Perl Mongers did last night) so<br clear="none">the dire warnings in that page can be ignored.<br clear="none"><br clear="none">Also, I'm guessing that people with slides will either bring their own<br clear="none">laptop or put them on a web page.  Bringing PDF/OpenOffice/HTML files on<br clear="none">a USB stick could also work.<br clear="none"><br
 clear="none">The suggestion on our page that people might randomly select a Perl<br clear="none">module to talk about could be adapted to "randomly select an OS<br clear="none">package".  For example on a debian-based distro, this 1-liner will<br clear="none">randomly select one of the packages you have installed:<br clear="none"><br clear="none">  dpkg --get-selections | \<br clear="none">      perl -E '@p = map { s/\s.*//r } <>; say $p[rand(+@p)]'<br clear="none"><br clear="none">See you Monday.<br clear="none"><br clear="none">Cheers<br clear="none">Grant<br clear="none"><br clear="none"><div class="yqt4503007402" id="yqtfd75790"><br clear="none">On Wed, 2014-02-12 at 15:14 +1300, Hugh Davenport wrote:<br clear="none">> Graciously stolen from Wellington Perl Mongers, who had a<br clear="none">> lightning session last night.<br clear="none">> <br clear="none">> <a shape="rect"
 href="http://wellington.pm.org/lightning_talks.html" target="_blank">http://wellington.pm.org/lightning_talks.html</a><br clear="none">> <br clear="none">> I shall add this to the WellyLUG page at some point.<br clear="none">> <br clear="none">> Let me know if you get a spark of ideas for a talk next monday!<br clear="none">> <br clear="none">> Cheers,<br clear="none">> <br clear="none">> Hugh<br clear="none">> <br clear="none">> <br clear="none"><br clear="none"><br clear="none"><br clear="none">-- <br clear="none">Wellington Linux Users Group Mailing List: <a shape="rect" ymailto="mailto:wellylug@lists.wellylug.org.nz" href="mailto:wellylug@lists.wellylug.org.nz">wellylug@lists.wellylug.org.nz</a><br clear="none">To Leave:  <a shape="rect" href="http://lists.wellylug.org.nz/mailman/listinfo/wellylug" target="_blank">http://lists.wellylug.org.nz/mailman/listinfo/wellylug</a><br clear="none"></div><br><br></div> </div>
 </div>  </div></body></html>