⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex69.sh

📁 Shall高级编程
💻 SH
字号:
#!/bin/bash# Non-interactive use of 'vi' to edit a file.# Emulates 'sed'.E_BADARGS=65if [ -z "$1" ]then  echo "Usage: `basename $0` filename"  exit $E_BADARGSfiTARGETFILE=$1# Insert 2 lines in file, then save.#--------Begin here document-----------#vi $TARGETFILE <<x23LimitStringx23iThis is line 1 of the example file.This is line 2 of the example file.^[ZZx23LimitStringx23#----------End here document-----------##  Note that ^[ above is a literal escape#+ typed by Control-V <Esc>.#  Bram Moolenaar points out that this may not work with 'vim',#+ because of possible problems with terminal interaction.exit 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -