Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. $ printf "foonbarn" > testfile
  2. $ cat testfile
  3. foo
  4. bar
  5. $ vim -E testfile <<-EOS
  6. > 1
  7. > s/foo/baz/
  8. > x
  9. > EOS
  10. $ echo $?
  11. 1
  12. $ cat testfile
  13. baz
  14. bar
  15. $ vim -E testfile +'1' +'s/baz/foo/' +'x'
  16. $ echo $?
  17. 0
  18. $
  19.  
  20. $ vim -E testfile <<-EOS
  21. > 1
  22. > p
  23. > q
  24. > EOS
  25. foo
  26. $ echo $?
  27. 1
  28. $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement