From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Re: how to manipulate data like awk or perl when visiting a file Date: Tue, 30 Dec 2008 16:02:45 +0100 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1230651685 18736 80.91.229.12 (30 Dec 2008 15:41:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Dec 2008 15:41:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 30 16:42:33 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 1LHgjm-0006oo-GG for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Dec 2008 16:42:30 +0100 Original-Received: from localhost ([127.0.0.1]:48849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LHgiY-0000O9-QU for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Dec 2008 10:41:14 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed2.telusplanet.net!newsfeed.telus.net!feeder.erje.net!news.motzarella.org!motzarella.org!rileyrgdev.motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 17 Original-X-Trace: news.eternal-september.org U2FsdGVkX1+nGsa0cegBYPKSSehjsmqtUEOydmzNax2i6MMLlOl5StjUlp8v0eWaLF4xE9J5v5UPJs3WgP2fLS6++0yH4uibRs/RHmv/9psctH8vB3dQCrRosONa5aqsq8sNDwNsSk6JK5HXhJPB/A== Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Tue, 30 Dec 2008 15:04:45 +0000 (UTC) X-Auth-Sender: U2FsdGVkX19IgbD9vjXgkTvWG6T5fxKAGCSOKWj+ft3jhH1Y2ZaU6w== Cancel-Lock: sha1:tLo8ojlYvHHvOOT0+n9jd+qXD6g= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:165645 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:60977 Archived-At: Kevin Rodgers writes: > reader@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 > > Are you familiar with M-| (shell-command-on-region)? See Xah Lee's excellent pages too: http://xahlee.org/emacs/emacs_unix.html