I only want one of the following values:
- 11.10
- oneiric
I've tried checking out lsb_release -r
and uname -a
, but the output is still verbose without using grep
. This is the closest I've gotten to:
- distribution name:
grep -oP 'CODENAME=(.+)' -m 1 /etc/lsb-release | awk -F= '{ print $NF }'
- version number:
grep -oP '\d+\.\d+' -m 1 /etc/lsb-release