From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 24 16:00:15 2018 Received: (at submit) by debbugs.gnu.org; 24 Jan 2018 21:00:15 +0000 Received: from localhost ([127.0.0.1]:41369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeS9W-0002Nb-Pq for submit@debbugs.gnu.org; Wed, 24 Jan 2018 16:00:15 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeS1c-0002Ao-N2 for submit@debbugs.gnu.org; Wed, 24 Jan 2018 15:52:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eeS1W-0007Ts-HY for submit@debbugs.gnu.org; Wed, 24 Jan 2018 15:51:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.7 required=5.0 tests=BAYES_50,FORGED_YAHOO_RCVD, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44957) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eeS1W-0007To-Dj for submit@debbugs.gnu.org; Wed, 24 Jan 2018 15:51:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eeS1V-0002UU-GM for bug-grep@gnu.org; Wed, 24 Jan 2018 15:51:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eeS1S-0007O6-Cx for bug-grep@gnu.org; Wed, 24 Jan 2018 15:51:57 -0500 Received: from sonic311-21.consmr.mail.ne1.yahoo.com ([66.163.188.202]:42062) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eeS1S-0007Mk-79 for bug-grep@gnu.org; Wed, 24 Jan 2018 15:51:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1516827112; bh=5HR4pJ2s6rGROuVEAJVMtJ9ShTCV6L8W1FlO5VkhsVg=; h=Date:From:To:Subject:References:From:Subject; b=CXkAN4sIZwAdXpvdfuGKYrP8IlolHlTFlCT4ySyTfv/t8gc9QMagmxAdpq2uKkWf8h6Sof1GM+s6doG2bD04Ycrrvu5sp5tSCPXoUULmpj1j6EqNRw3PcfcI/4X3IMBok95rAMP1FgKd4+zqrM7mIcRTaaeZxCNt16Mv6LBGSqyI9+Txvc40TFoDYS6B8QhQK4V20B6nzNV3ZETCJEpp5xKF53fn1P7pAK393L5yVCNW0n3b78ZstIDXq4KivuEYikWPsAiBqfn66G3eVs0mRQsn1zEGJFPh9KfsH/buD6u4iIryQ2BXVS9SJBoEbWgT8nIRwiPLE9lvYocJbf8HjA== X-YMail-OSG: WzPHhSUVM1l6xuHX6Cfy5CirlAhaN7_ScpXHABJ6I_8_7ck4X9CpBUbq.GaEZLL vO0LQXQJaPJ4hlcDuBbvHD5zc4hwJH.rUFuorxDDEB88fF1ReAUsZucr3HbnHCZwFK3.5gtyyn_h W3q0ZN.QT.RBSf4KQfZRAe7GUGjhdTm58DaBEQKrLcisGARJhkaXzic8gK46JpPmg.DtCBk2J6Go frpCwsP9Yub7trgShkUTpoP_mdiIjnwLKgIOhYUDrH4Yzc6KA4oD68hhfHcjcvr7AmyD3Vq7.WOJ laszJwGYersUO62TFn8Y77bZ9irDf8cTRNsr73Lb1r_YaYHmCKTu2PSBm3Q_Hp20u5dOIblL.5K2 OzuO0fQLEQxU7IrmMj0FZcYKKXKBLujF_ibW3iwS_ptmt6AC1xv_2eajaa5SsIBIqG_g0EhMNtkw DKEizPbqRo0vORl_bN7iRU85ywVa94Kom5Tc5I1dkjV2O3DEfs1i14cU4QEeUpfQXO33BRZWgrwq Ls3KSDGo4qeqObcZkIxE0lb6iUBKQNw_z Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Wed, 24 Jan 2018 20:51:52 +0000 Date: Wed, 24 Jan 2018 20:51:49 +0000 (UTC) From: Masoudi To: "bug-grep@gnu.org" Message-ID: <1147823779.536649.1516827109532@mail.yahoo.com> Subject: help MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_536648_1777092824.1516827109531" References: <1147823779.536649.1516827109532.ref@mail.yahoo.com> X-Mailer: WebService/1.1.11214 YMailNorrin Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Content-Length: 1255 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 24 Jan 2018 16:00:13 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.1 (---) ------=_Part_536648_1777092824.1516827109531 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hii want to copy some data from a file by using of grep...grep -n A HISTORY= > outbut the desired information is not the line of A, and i need informat= ion located at the next line ( below line of A) A=C2=A0 1=C2=A0=C2=A0 2=C2=A0=C2=A0 3 23=C2=A0=C2=A0 34=C2=A0 55 i mean i need the line 23 34 55.would you mind to help me please?many thank= s ------=_Part_536648_1777092824.1516827109531 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Hi
i want to copy some data from a file by using of grep...
grep -n A HISTORY > out
but the desired information is not the line of A, and i need information located at the next line ( below line of A)

A  1   2   3

23   34  55

i mean i need the line 23 34 55.
would you mind to help me please?
many thanks
------=_Part_536648_1777092824.1516827109531-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 24 17:22:42 2018 Received: (at control) by debbugs.gnu.org; 24 Jan 2018 22:22:42 +0000 Received: from localhost ([127.0.0.1]:41476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeTRJ-0007WL-V9 for submit@debbugs.gnu.org; Wed, 24 Jan 2018 17:22:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeTRH-0007Vz-Fe; Wed, 24 Jan 2018 17:22:40 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A40FFC056826; Wed, 24 Jan 2018 22:22:33 +0000 (UTC) Received: from [10.10.124.3] (ovpn-124-3.rdu2.redhat.com [10.10.124.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1BA68424F; Wed, 24 Jan 2018 22:22:32 +0000 (UTC) Subject: Re: bug#30242: help To: Masoudi , 30242-done@debbugs.gnu.org, GNU bug control References: <1147823779.536649.1516827109532.ref@mail.yahoo.com> <1147823779.536649.1516827109532@mail.yahoo.com> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Organization: Red Hat, Inc. Message-ID: <613467d7-d329-5c0b-a500-e9cb501d9f1b@redhat.com> Date: Wed, 24 Jan 2018 16:22:32 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1147823779.536649.1516827109532@mail.yahoo.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1I3nZo1P9uRJpNWH3IzwooyqADSYQwhZ7" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 24 Jan 2018 22:22:33 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1I3nZo1P9uRJpNWH3IzwooyqADSYQwhZ7 Content-Type: multipart/mixed; boundary="AMKwe2XMf2NysrsP1W2DXdMYsGGGiTW4H"; protected-headers="v1" From: Eric Blake To: Masoudi , 30242-done@debbugs.gnu.org, GNU bug control Message-ID: <613467d7-d329-5c0b-a500-e9cb501d9f1b@redhat.com> Subject: Re: bug#30242: help References: <1147823779.536649.1516827109532.ref@mail.yahoo.com> <1147823779.536649.1516827109532@mail.yahoo.com> In-Reply-To: <1147823779.536649.1516827109532@mail.yahoo.com> --AMKwe2XMf2NysrsP1W2DXdMYsGGGiTW4H Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable tag 30242 notabug thanks On 01/24/2018 02:51 PM, Masoudi wrote: > Hii want to copy some data from a file by using of grep...grep -n A HIS= TORY > outbut the desired information is not the line of A, and i need in= formation located at the next line ( below line of A) > A=C2=A0 1=C2=A0=C2=A0 2=C2=A0=C2=A0 3 > 23=C2=A0=C2=A0 34=C2=A0 55 > i mean i need the line 23 34 55.would you mind to help me please?many t= hanks (Your email engine botched the formatting of your mail as rendered in plain text; technical lists tend to frown on html mail as unnecessary overhead and lousy rendering) grep already supports this: use 'grep -A1 "$pattern"' to output a line that matches and the line immediately following the match. If you further want ONLY the line after, you can do things like: grep -n -A1 "$patt" | sed -n 's/^[1-9][0-9]*-//p' which uses the decorate-act-undecorate paradigm (grep -n decorates matches with 'line:' and followups with 'line-'; the sed then picks the followups and removes the decorations). As -A is already documented as a grep option, I'm closing this as not a bug in the database. However, feel free to followup with further questions on the topic. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org --AMKwe2XMf2NysrsP1W2DXdMYsGGGiTW4H-- --1I3nZo1P9uRJpNWH3IzwooyqADSYQwhZ7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlppBygACgkQp6FrSiUn Q2rWewgAnvA9KCWVhiBUJ/+JHEvbXz6oGmFb/klPmM1rg8U3/bjns22SKT8Dju4K nIo+bPLdVUtv3c0gZjOus1C9QOP0qQj+l8E02Wv0TPoo5rPGaFB+HajJ6uPjgVza QXmjQCwDTGZpeCxSCYLqk89SKCjxuWYTeoOTBI5PBydqexRzwEHWGztGmnOdHCoj /64SFggGaC1PvjQ7fkmvxnJvZWiGL1TDTqjiVcTIrraKT+LMhM/4rZD9IUf/6Day uy03yks/deIhJn8Z/Own93TY/tYB4iaOwwdS1cS8kS+fyYtbgKUKgm4svuiiwoXl QHzdNwsEJkd3p/KGT7g7+rv0Ub/jMg== =jBZQ -----END PGP SIGNATURE----- --1I3nZo1P9uRJpNWH3IzwooyqADSYQwhZ7-- From unknown Wed Sep 10 17:01:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 22 Feb 2018 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator