From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: poppyer Newsgroups: gmane.emacs.help Subject: Re: how to manipulate data like awk or perl when visiting a file Date: Mon, 29 Dec 2008 14:19:22 +0800 Organization: Poppyer Group Message-ID: <381vvrijv9.fsf@nusnet-97-126.dynip.nus.edu.sg> References: <2ba0bf32-383e-41e5-8f75-32e8b7440f8f@r37g2000prr.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1230532891 14084 80.91.229.12 (29 Dec 2008 06:41:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Dec 2008 06:41:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 29 07:42:40 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LHBpn-0000QV-VS for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Dec 2008 07:42:40 +0100 Original-Received: from localhost ([127.0.0.1]:40805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LHBoa-0004co-BS for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Dec 2008 01:41:24 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.k-dsl.de!news.motzarella.org!motzarella.org!news.motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-X-Trace: news.eternal-september.org U2FsdGVkX1/bzfHobVb11/apyHoaPTJawNWOTUM/OSdknJXsqJblQnGhM+iO8/F+UEGW797jOkLGQwigTzgwOArpoMEYUCu+rQYHwU23IyZw7Uftv+c/ZcSEtJ5gbxGdDKQHkHN7fhI= Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Mon, 29 Dec 2008 06:19:23 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1+Vz2LfZsSA3Nst65gb4sKh13ffBBVou4o= Cancel-Lock: sha1:h+6jtLxiCmpntKts+cVIMIJqh7M= sha1:4i0j6PccKOyLDCHYYuRtXOeYLlI= User-Agent: Emacs Gnus Original-Xref: news.stanford.edu gnu.emacs.help:165626 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60957 Archived-At: rustom writes: : On Dec 29, 9:14 am, rea...@newsguy.com wrote: :> I want to get a leg up on how I might manipulate a file like I can :> with shell tools or awk/perl. :> :> Examples:  I want to display only the first field of lines 30 thru 75 :>            I want to reverse field 1 and 5 and print those plus 6 of :>            each line. :>            I want to add up the numbers that appears in field 7 of :>            lines 11 through 28 printing the total to ~/sumtot.txt :> :> I'd like to see a few basic examples and maybe I'll be able to get the :> idea enough to do some of that when I need to. :> :> I don't really want to start way at the beginning of elisp to get :> started.   I hoped maybe there are some examples like that available :> in existing info documents. :> :> I haven't noticed much talk here about those kinds of chores so maybe :> elisp isn't a good choice for that? : : There was a discussion on something like this a few days ago. See : http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/77dc549480d95f92# This seems not so relevant. One way I can think of is to replace TAB to | first and then use orgtbl-mode, the Org Table editor to do the work. Is there any way without replace TAB first and manipulate them directly? Cheers, poppyer