转自:http://blog.csdn.net/apache0554/article/details/45508631 cat <<EOF和cat <<-EOF两个都是获取stdin,并在EOF处结束stdin,输出stdout. 但是<<-是什么意思呢? 先来看man中的说明: If the redirection operator is <<-, then all leading tab characters are stripped from inpu
原文:http://blog.csdn.net/apache0554/article/details/45508631 ----------------------------------------------------------------------------------- 两个都是获取stdin,并在EOF处结束stdin,输出stdout. 但是<<-是什么意思呢? 先来看man中的说明: If the redirection operator is <<-, th
.多行导入文件(新建文件或者覆盖文件内容) cat << EOF > abcd.txt Hello! This is a test file! Test for cat and EOF! EOF 来看下执行结果 cat abcd.txt Hello! This is a test file! Test for cat and EOF! 这就是多行导入! 用法2.文件追加 cat << EOF >> test.sh 3:说明 其实可以用其他字符来
往往在编写脚本完后测试,出现错误需要调试,vim 是一种强大的文本编辑器,对调试也很有帮助.如果指定用不同的颜色显示某些错误,通过配置 .vimrc 文件就会替您完成大部分调试工作. 小柏在测试脚本时,遇到一个错误提示如下: [root@bqh-118 scripts]# vim md5pojie.sh [root@bqh-118 scripts]# sh md5pojie.sh md5pojie.sh: line 17: unexpected EOF while looking for mat