#!/bin/bash
#script name: a.sh
#author: aaron <<EOF
echo "line 1"
echo "line 2"
echo "line 3"
EOF cat <<EOF > a.out
echo "line 4"
echo "line 5"
echo "line 6"
EOF cat <<EOF
echo "line 7"
echo "line 8"
echo "line 9"
EOF
line 1 2 3 注释掉了
line 4 5 6 输出到 a.out
line 7 8 9 输出到屏幕