Loading ...
Sorry, an error occurred while loading the content.

[jasspa] piping it in

Expand Messages
  • Ian
    This sort of an rtfm-question, but... ?what? is the correct syntax for invoking grep on a buffer, and piping it into another (preferably on-the-fly-one)?
    Message 1 of 2 , Jun 27, 2007
    View Source
    • 0 Attachment
      This sort of an rtfm-question, but...

      ?what? is the correct syntax for invoking grep on a buffer,
      and piping it into another (preferably on-the-fly-one)?

      Similarly for 'sort' (with args); uniq etc. I must be doing something
      wrong, 'cause no dice.

      Soon frustrated-no-mo' i-hope

      Ian

      this post <http://tech.groups.yahoo.com/group/jasspa/message/2272>
    • Jon Green
      ... If you really do want to run a shell command on the actual contents of a buffer from the command line then use filter-buffer
      Message 2 of 2 , Jun 30, 2007
      View Source
      • 0 Attachment
        Ian wrote:
        > This sort of an rtfm-question, but...
        >
        > ?what? is the correct syntax for invoking grep on a buffer,
        > and piping it into another (preferably on-the-fly-one)?

        If you really do want to run a shell command on the actual contents of a
        buffer from the command line then use

        filter-buffer "<command line with stdin/stdout options>"

        I do think that this is actually what you want to do.

        For grep <files> then use "M-x grep" the variable "%grep-com" is the
        standard options.

        The command "M-x uniq" and "M-x sort" work between point and mark and
        are buffer equivalents of the standard UNIX commands.

        For standard command line stuff then simply use "ipipe-shell-command"
        and add the appropriate command line, the output is left in a '*'
        temporary buffer.

        >
        > Similarly for 'sort' (with args); uniq etc. I must be doing something
        > wrong, 'cause no dice.
        >
        > Soon frustrated-no-mo' i-hope

        Sorry for the late response - not been around.

        Hope that helps.
        Jon.
      Your message has been successfully submitted and would be delivered to recipients shortly.