Saturday, November 30, 2019

Problems using :read with external command

I have a file, test.txt, containing two lines:

18415
480

If I do:
:%!gawk "{sum+=$1}END{print sum}"
I get the result in a new buffer, but if I try to put the result below
the last line, using
r %!gawk "{sum+=$1}END{print sum}"
I get:
E484: Can't open file test.txt!gawk

How can I put the result of an external command below the last line?
Many thanks in advance,

--
Cesar

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/qrv5fi%241kk1%241%40blaine.gmane.org.

No comments: