Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ printf "foonbarn" > testfile
- $ cat testfile
- foo
- bar
- $ vim -E testfile <<-EOS
- > 1
- > s/foo/baz/
- > x
- > EOS
- $ echo $?
- 1
- $ cat testfile
- baz
- bar
- $ vim -E testfile +'1' +'s/baz/foo/' +'x'
- $ echo $?
- 0
- $
- $ vim -E testfile <<-EOS
- > 1
- > p
- > q
- > EOS
- foo
- $ echo $?
- 1
- $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement