unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: poppyer <poppyer@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: how to manipulate data like awk or perl when visiting a file
Date: Mon, 29 Dec 2008 14:19:22 +0800	[thread overview]
Message-ID: <381vvrijv9.fsf@nusnet-97-126.dynip.nus.edu.sg> (raw)
In-Reply-To: 2ba0bf32-383e-41e5-8f75-32e8b7440f8f@r37g2000prr.googlegroups.com


rustom <rustompmody@gmail.com> 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


  reply	other threads:[~2008-12-29  6:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.3478.1230524085.26697.help-gnu-emacs@gnu.org>
2008-12-29  6:02 ` how to manipulate data like awk or perl when visiting a file rustom
2008-12-29  6:19   ` poppyer [this message]
2008-12-29  6:14 ` Xah Lee
2008-12-30  6:59   ` Harry Putnam
     [not found]   ` <mailman.3532.1230620390.26697.help-gnu-emacs@gnu.org>
2008-12-30 14:57     ` Ted Zlatanov
2008-12-29  4:14 reader
2008-12-30 14:34 ` Kevin Rodgers
     [not found] ` <mailman.3568.1230647701.26697.help-gnu-emacs@gnu.org>
2008-12-30 15:02   ` Richard Riley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=381vvrijv9.fsf@nusnet-97-126.dynip.nus.edu.sg \
    --to=poppyer@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).