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.moll...@mailoo.org>

Reply via email to