Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #159413
| From | tomas@tuxteam.de |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Extract substring from cat |
| Date | 2015-10-18 22:10 +0200 |
| Message-ID | <ql2rg-7dt-15@gated-at.bofh.it> (permalink) |
| References | <qkcCm-6zl-9@gated-at.bofh.it> <qkcCm-6zl-7@gated-at.bofh.it> <qkcM2-6LS-5@gated-at.bofh.it> <qkdyp-7XP-1@gated-at.bofh.it> <ql2hA-6M1-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
-----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, tomas@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. Yours is an example of "useless > > use of cat" [1], better spelt as > > > > grep ^PRETTY_NAME /etc/*-release | sed 's/^.*=//' > > > > Even better, since sed can do grep: > > > > sed -ne '/^PRETTY_NAME=/ s/^.*=// p' < /etc/*-release > > Not if there may be more than one file matching the pattern. In that > case at least your "better" example breaks. It can be fixed by > omitting "<". You are right, of course. Thanks :-) - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEUEARECAAYFAlYj8pwACgkQBcgs9XrR2kanlQCYsVXb2pIomOKeQaqCNTbEKrqZ dQCfSIKTynqVZCWbxKlfc6NL/AVBNvI= =I46h -----END PGP SIGNATURE-----
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Extract substring from cat "Alfred Charles Stockton" <alf@devacs.za.net> - 2015-10-16 14:50 +0200
Re: Extract substring from cat Nemeth Gyorgy <friczy@freemail.hu> - 2015-10-16 15:00 +0200
Re: Extract substring from cat <tomas@tuxteam.de> - 2015-10-16 15:50 +0200
Re: Extract substring from cat Kurt Flex <flxkrt@aol.com> - 2015-10-18 22:00 +0200
Re: Extract substring from cat tomas@tuxteam.de - 2015-10-18 22:10 +0200
Re: Extract substring from cat Darac Marjal <mailinglist@darac.org.uk> - 2015-10-16 15:10 +0200
Re: Extract substring from cat Santiago Vila <sanvila@unex.es> - 2015-10-16 15:30 +0200
Re: Extract substring from cat "John L. Cunningham" <djohngo@gmail.com> - 2015-10-16 15:30 +0200
Re: Extract substring from cat Jonathan <winelauncher.jonathan@googlemail.com> - 2015-10-17 01:40 +0200
Re: Extract substring from cat Cindy-Sue Causey <butterflybytes@gmail.com> - 2015-10-17 03:40 +0200
csiph-web