Questions tagged [pipe]

11 questions
5
votes
1 answer

Using pipe in a shell command

Say I am in dired and the pointer is on a file called test which contains: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. I type ! to run a shell command on this file. I type tac | head -n 2 I get…
user27815
  • 239
  • 1
  • 6
5
votes
0 answers

Is there some way to continue reading from a STDIN file descriptor when data is PIPED to Emacs on Command-line?

Historical Perspective On Unix like operating systems, it is common practice to redirect IO between shell commands using pipes. For example, the command below would insert all the lines that didn't match "10.1.2.3" into the *scratch* buffer in…
Melioratus
  • 4,504
  • 1
  • 25
  • 43
4
votes
1 answer

How to implement the native |> pipe in ESS mode

Using the code provided here I can use the magrittr package pipe %>%. I want to switch to the new native R pipe |>, but if I just substitute the old pipe with the new one the code is not recognized as continued and therefore is not indented. What it…
Claudio
  • 151
  • 5
2
votes
1 answer

How to pipe data through multiple processes?

Currently I'm generating text from a command, eg: (with-temp-buffer (call-process "my-command" nil t nil "my" "args") ;; operate on output in current buffer. ) How can I use pipes, something that would be written in shell like…
ideasman42
  • 8,375
  • 1
  • 28
  • 105
2
votes
2 answers

Slurp standard-input into a buffer

How do I read the entire contents of stdin into an Emacs buffer in #! /usr/bin/env emacs --script mode? Stdin may not be a regular file.
Lassi
  • 377
  • 1
  • 7
1
vote
2 answers

How to "pipe" a string to a shell command in elisp rather than give it as an arg?

The command I'm trying to duplicate: curl https://example.com | readability https://example.com As far as I can see, though, using that | pipe is NOT the same as passing the string in as an arg. If I have a string that I am ready to pass to…
Webdev Tory
  • 319
  • 1
  • 10
1
vote
1 answer

Piping contents of buffer into eshell command

I know eshell supports output redirection to buffers cmd > # Is there a way to do piping buffer contents into command? I would like to have something like cat # | cmd The problem is that cat is not a builtin so it doesn't…
GenaU
  • 103
  • 8
1
vote
1 answer

pipe buffer contents to shell as pseudo-file

I'd like to use wdiff to compare the contents of the current buffer to a previous version of the file the buffer is visiting. So, this would be a word-level live diff of the current buffer against a given git commit. The shell version of this would…
Matt
  • 43
  • 6
0
votes
1 answer

Is there a way to escape `|` inside tables?

If I tab this: | Expression | Meaning | |---+---| | /a|b/ | a or b | I get this: | Expression | Meaning | | |------------+---------+--------| | /a | b/ | a or b | | | | | Is there a…
user19777
0
votes
1 answer

how to execute shell command with piping in Elisp?

I am trying to duplicate the following bash command in Elisp: curl https://google.com | readability https://google.com Here's what I have so far, but it doesn't capture the piping "| readability" part of it. How can I use Elisp to pass info that…
Webdev Tory
  • 319
  • 1
  • 10
-1
votes
1 answer

Non-shell command on region?

I know about shell-command-on-region. Is there any way to pipe a region through a non-shell command? The start-process and call-process functions invoke executables directly, without using the shell. I'd like to avoid shell overhead when piping the…
HippoMan
  • 582
  • 2
  • 11