Re: Extract substring from cat

2015-10-18 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, Oct 18, 2015 at 09:58:01PM +0200, Kurt Flex wrote: > On Fri, Oct 16, 2015 at 03:14:31PM +0200, to...@tuxteam.de wrote: > > On Fri, Oct 16, 2015 at 02:54:25PM +0200, Nemeth Gyorgy wrote: > > > 2015-10-16 14:15 keltezéssel, Alfred Charles Stockto

Re: Extract substring from cat

2015-10-18 Thread Kurt Flex
On Fri, Oct 16, 2015 at 03:14:31PM +0200, to...@tuxteam.de wrote: > On Fri, Oct 16, 2015 at 02:54:25PM +0200, Nemeth Gyorgy wrote: > > 2015-10-16 14:15 keltezéssel, Alfred Charles Stockton írta: > > cat /etc/*-release | grep ^PRETTY_NAME | sed 's/^.*=//' > > Many insightful answers have been given

Re: Extract substring from cat

2015-10-16 Thread Cindy-Sue Causey
On 10/16/15, Jonathan wrote: > On Fri, 16 Oct 2015 14:15:46 +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. >> >> Please tell me how I should go about this? > > lsb_rel

Re: Extract substring from cat

2015-10-16 Thread Jonathan
On Fri, 16 Oct 2015 14:15:46 +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. > > Please tell me how I should go about this? lsb_release -ds from lsb-release package.

Re: Extract substring from cat

2015-10-16 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Oct 16, 2015 at 02:54:25PM +0200, Nemeth Gyorgy wrote: > 2015-10-16 14:15 keltezéssel, Alfred Charles Stockton írta: > > > > If I issue the command cat /etc/*-release on my Debian system I get:- > > > > PRETTY_NAME="Debian GNU/Linux 8 (jessie

Re: Extract substring from cat

2015-10-16 Thread John L. Cunningham
On Fri, Oct 16, 2015 at 02:15:46PM +0200, Alfred Charles Stockton wrote: > > If I issue the command cat /etc/*-release on my Debian system I get:- > > PRETTY_NAME="Debian GNU/Linux 8 (jessie)" > NAME="Debian GNU/Linux" > VERSION_ID="8" > VERSION="8 (jessie)" > ID=debian > HOME_URL="http://www.deb

Re: Extract substring from cat

2015-10-16 Thread Santiago Vila
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

Re: Extract substring from cat

2015-10-16 Thread Darac Marjal
On Fri, Oct 16, 2015 at 02:15:46PM +0200, Alfred Charles Stockton wrote: > > If I issue the command cat /etc/*-release on my Debian system I get:- > > PRETTY_NAME="Debian GNU/Linux 8 (jessie)" > NAME="Debian GNU/Linux" > VERSION_ID="8" > VERSION="8 (jessie)" > ID=debian > HOME_URL="http://www.deb

Re: Extract substring from cat

2015-10-16 Thread Nemeth Gyorgy
2015-10-16 14:15 keltezéssel, Alfred Charles Stockton írta: > > If I issue the command cat /etc/*-release on my Debian system I get:- > > PRETTY_NAME="Debian GNU/Linux 8 (jessie)" > NAME="Debian GNU/Linux" > VERSION_ID="8" > VERSION="8 (jessie)" > ID=debian > HOME_URL="http://www.debian.org/"; >

Extract substring from cat

2015-10-16 Thread Alfred Charles Stockton
If I issue the command cat /etc/*-release on my Debian system I get:- PRETTY_NAME="Debian GNU/Linux 8 (jessie)" NAME="Debian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=debian HOME_URL="http://www.debian.org/"; SUPPORT_URL="http://www.debian.org/support/"; BUG_REPORT_URL="https://bugs.debia