On 10/14/2018 1:55 PM, Étienne Mollier wrote:
>
>
> 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 "\<${pa
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
(
On 10/14/2018 1:24 PM, Étienne Mollier wrote:
> John Doe, on 2018-10-14:
>> Hi,
>
> Good Day,
>
>> With gawk I'm able to do the following:
>>
>> $ gawk -v pattern=try '$0 ~ "\\<"pattern"\\>"{getline;print $2}'
>> ~/.ssh/config
>> ~/.ssh/try/id_rsa
>>
>> $ cat ~/.ssh/config
>> Host try
>> Identity
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:
John Doe, on 2018-10-14:
> Hi,
Good Day,
> With gawk I'm able to do the following:
>
> $ gawk -v pattern=try '$0 ~ "\\<"pattern"\\>"{getline;print $2}'
> ~/.ssh/config
> ~/.ssh/try/id_rsa
>
> $ cat ~/.ssh/config
> Host try
> IdentityFile ~/.ssh/try/id_rsa
>
> I don't want to install extra pkgs on
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
$ cat ~/.ssh/config
Host try
IdentityFile ~/.ssh/try/id_rsa
I don't want to install extra pkgs on Debian Stretch (9).
Googling around didn't turn out some
6 matches
Mail list logo