From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 734F6138206 for ; Wed, 17 Jan 2018 01:49:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 51C5CE0843; Wed, 17 Jan 2018 01:49:51 +0000 (UTC) Received: from mail-ot0-x22b.google.com (mail-ot0-x22b.google.com [IPv6:2607:f8b0:4003:c0f::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DE0D6E0817 for ; Wed, 17 Jan 2018 01:49:50 +0000 (UTC) Received: by mail-ot0-x22b.google.com with SMTP id 44so14539579otk.8 for ; Tue, 16 Jan 2018 17:49:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=qhJxGryWpNV7bfWMGq6TmXNyZolTRi8npii3pza5aj0=; b=uEEx/0rSb/Z3jwZ6HSVH0d4VmDcLtEjJrrSkg4zAWXAC9gnUFD1THR+fwF+iwJPl2C jSwulCf+a7v3TJZ2hO4DJ9naPonqH2Peaa5tbKS/FzxrPNzQO2dW8lhQH2TSjP8XbD4n MMguWaMGF3NoUG0AmouUzN80yFtu5AjADbSSrnrkyeswBQtz/i/7lUw1LIWu2mQJQoDn ymM4BhlpvcmRPXIMIxW6t/zOGuTy+7idOnrCdaV9PB3rCjHHVMj/iI7OQ2WhQRiMwRj3 VwY24mHhRlG1b5YCf/pyaH8NvDFdnSmIHbxkjG7/JRAd8m7Ee9dfRR41MPBS6taeqjba 36Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=qhJxGryWpNV7bfWMGq6TmXNyZolTRi8npii3pza5aj0=; b=phy8pkRtYlQDMVLwoqgFR2kRD0chtf4ca+2qoBzuZtzFYgqgLusq8Iv5f8qOIxKY6l AtppSNeMf9qcsjyWw4W0qKEbLQqHIM8oXZ00KFdghTPAdE8/x7mc7coQD5h91I8s6IMQ fPww2RGtSmupvR077TJKAarkpKAPDQExxOBz8JSLL2m6kEz2RY7BOmETWgVVzud/JrIB lwsI3AQ/C5FW0WEr3XwZbLnreir1JIa0gOEbLpmp1jG8j/Raf6ZwYw6j5yF7P6jeNHzn XHThmCjtqOrPob2EBchdC5KEApA/PoGoQxGGvVOPd6HzEgjAk2Lgie3N1bR85s7IGEk7 aSYA== X-Gm-Message-State: AKwxytfRTDSHbH7LkOLywhBmfp4yTKTHXZ+1fWBc/Hx2tPyueVGxdE3N b5GubJOmJKf7+VQE6TtokEfbAPJn8xYlPTVaPdwlFOXL X-Google-Smtp-Source: ACJfBov1IhmZEoE3arLAjGjDAklhsHEHOYHMzO8kciw6/pX4WC1iZZm9ZQTcwHstCzobbXN//ht183eNRAof948BcLQ= X-Received: by 10.157.74.51 with SMTP id h48mr189137otf.239.1516153789800; Tue, 16 Jan 2018 17:49:49 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.157.49.36 with HTTP; Tue, 16 Jan 2018 17:49:49 -0800 (PST) From: Adam Carter Date: Wed, 17 Jan 2018 12:49:49 +1100 Message-ID: Subject: [gentoo-user] OT awk question To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary="94eb2c096c6410e5c50562ef10a2" X-Archives-Salt: 2f7f9a2f-13f0-41de-9e3e-929c40e7880d X-Archives-Hash: 1547e4ddfc01aeba46b49e41e54031c5 --94eb2c096c6410e5c50562ef10a2 Content-Type: text/plain; charset="UTF-8" I'm using this to grab a section of text across multiple lines, how do i get it to exit after the first match? awk '/foo/,/bar/' --94eb2c096c6410e5c50562ef10a2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm using this to grab a section of text across multiple = lines, how do i get it to exit after the first match?

awk '/foo/,/bar/'
--94eb2c096c6410e5c50562ef10a2--