[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Extract substring from cat



On Fri, Oct 16, 2015 at 02:15:46PM +0200, Alfred Charles Stockton wrote:
> Now what I would like to do is to only print the substring "Debian
> GNU/Linux 8 (jessie)" from the 1st line, preferably in bash.

The standard says /etc/os-release is shell-compatible, so I would do this:

. /etc/os-release
echo ${PRETTY_NAME}


Reply to: