<p dir="ltr">cat /proc/version </p>
<br><div class="gmail_quote"><div dir="ltr">On Thu, 24 Nov 2016, 11:36 Bill Kenworthy <<a href="mailto:billk@iinet.net.au">billk@iinet.net.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What's the best way to get kernel version from a binary?<br class="gmail_msg">
<br class="gmail_msg">
Context is that the raspberry pi stock firware doesn’t use version<br class="gmail_msg">
numbers in the filename and I want to know what kernel version I am<br class="gmail_msg">
building a custom initrd using dracut for a btrfs on root filesystem.<br class="gmail_msg">
<br class="gmail_msg">
Easy to get manually (strings|grep the file) but its clumsy and hard to<br class="gmail_msg">
get precision in a script and uname doesn’t work on a file :(<br class="gmail_msg">
<br class="gmail_msg">
BillK<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
PLUG discussion list: <a href="mailto:plug@plug.org.au" class="gmail_msg" target="_blank">plug@plug.org.au</a><br class="gmail_msg">
<a href="http://lists.plug.org.au/mailman/listinfo/plug" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.plug.org.au/mailman/listinfo/plug</a><br class="gmail_msg">
Committee e-mail: <a href="mailto:committee@plug.org.au" class="gmail_msg" target="_blank">committee@plug.org.au</a><br class="gmail_msg">
PLUG Membership: <a href="http://www.plug.org.au/membership" rel="noreferrer" class="gmail_msg" target="_blank">http://www.plug.org.au/membership</a></blockquote></div>