I try to grab just the version number of qrencode
but it does not work. Any idea why?
$ qrencode --version | head -1 | awk '{print $3}'
qrencode version 3.4.4
Copyright (C) 2006-2012 Kentaro Fukuchi
I am quite confused because this sort of techniques use to work fine with most packages:
$ gzip --version | head -1 | awk '{print $2}'
1.6
Edit: thanks for the help. This is because for qrencode
the output of --version
is print to stderr instead of stdout. According so answer comments this is common to some extend. A bit weird to me, but fair enough.