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


Groups > linux.debian.user > #201212

Re: Word-boundary mawk Debian Stretch

From john doe <johndoe65534@mail.com>
Newsgroups linux.debian.user
Subject Re: Word-boundary mawk Debian Stretch
Date 2018-10-14 13:50 +0200
Message-ID <wIN4d-1S0-1@gated-at.bofh.it> (permalink)
References <wIJMZ-8uZ-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 10/14/2018 10:13 AM, john doe wrote:
> Hi,
> 
> With gawk I'm able to do the following:
> 
> $ gawk -v pattern=try '$0 ~ "\\<"pattern"\\>"{getline;print $2}'
> ~/.ssh/config
> ~/.ssh/try/id_rsa
>

I forgot in the above command 'exit' at the end of the gawk command.
So the command in question is:

$ gawk -v pattern=try '$0 ~ "\\<"pattern"\\>"{getline;print $2;exit}'

-- 
John Doe

Back to linux.debian.user | Previous | Next — Previous 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