Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #201214

Re: Word-boundary mawk Debian Stretch

From Étienne Mollier <etienne.mollier@mailoo.org>
Newsgroups linux.debian.user
Subject Re: Word-boundary mawk Debian Stretch
Date 2018-10-14 14:00 +0200
Message-ID <wINdT-1V5-5@gated-at.bofh.it> (permalink)
References <wIJMZ-8uZ-1@gated-at.bofh.it> <wIMKS-1LW-3@gated-at.bofh.it> <wIN4e-1S0-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 10/14/18 1:47 PM, john doe wrote:
> Thank you, I was hoping for something with less pipes redirection but
> given that portability is required, I might as wel go that way! :)

Sure, one less:

	$ pattern=try grep -A1 -E "\<${pattern}\>" | mawk '{getline;print $2;exit}'
(in)	noise
(in)	Host try
(in)	IdentityFile ~/.ssh/try/id_rsa1
(in)	noise
(in)	Host try
(in)	IdentityFile ~/.ssh/try/id_rsa2
(in)	noise
(out)	~/.ssh/try/id_rsa1

and it should work as expected, this time.  :-)

Kind Regards,
-- 
Étienne Mollier <etienne.mollier@mailoo.org>

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Word-boundary mawk Debian Stretch john doe <johndoe65534@mail.com> - 2018-10-14 10:20 +0200
  Re: Word-boundary mawk Debian Stretch Étienne Mollier <etienne.mollier@mailoo.org> - 2018-10-14 13:30 +0200
    Re: Word-boundary mawk Debian Stretch john doe <johndoe65534@mail.com> - 2018-10-14 13:50 +0200
      Re: Word-boundary mawk Debian Stretch Étienne Mollier <etienne.mollier@mailoo.org> - 2018-10-14 14:00 +0200
        Re: Word-boundary mawk Debian Stretch john doe <johndoe65534@mail.com> - 2018-10-15 13:40 +0200
  Re: Word-boundary mawk Debian Stretch john doe <johndoe65534@mail.com> - 2018-10-14 13:50 +0200

csiph-web