3
# Noninteractive use of 'vi' to edit a file.
10
echo "Usage: `basename $0` filename"
16
# Insert 2 lines in file, then save.
17
#--------Begin here document-----------#
18
vi $TARGETFILE <<x23LimitStringx23
20
This is line 1 of the example file.
21
This is line 2 of the example file.
25
#----------End here document-----------#
27
# Note that ^[ above is a literal escape
28
#+ typed by Control-V <Esc>.
30
# Bram Moolenaar points out that this may not work with 'vim'
31
#+ because of possible problems with terminal interaction.