Thursday, March 26, 2020

Re: "Auto Yes" to Warnings On Save (Scriptability)

Yes, I think tail is a much simpler option.  Just be aware you can't do this:

tail -n 25 myfile > myfile

... because the "> myfile" opens and truncates the file (throwing away the contents) before the tail command runs.

Something like this would work:

tail -n 25 myfile > /tmp/tail$$
mv /tmp/tail$$ myfile

--
--
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/1c8d9b61-45b1-4977-a285-59a8a3cc9045%40googlegroups.com.

No comments: