1. <<!eof !eof 中间的命令可以作为之前打开的命令的输入。
eg: /platdb/bin/psql -h pglocalhost -U scncraft -tA -F'|' <<!eof | /bin/sed -e 's/|/ /g' > $getTblNameResult 2>&1
select item,path from RCMENUTBL where parent='$EM2M_SPA_NAME' and title like '%$PREFIX_MAPPING_TABLE_NAME';
!eof
如上,会先进入psql 命令中,然后 执行select 语句。
2. 1> 标准输出 2> 标准错误输出 1>file & , &表示后台执行。
3. if [[ ]];then
elif [[ ]];then
elif [[]];then
else
fi
4.