转自: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:说明 其实可以用其他字符来