shell将脚本输出结果记录到日志文件时间:2023-11-24 11:14:14使用tee命令: sh portal/main.sh |tee log.txt 获取脚本父类路径cmddir="`dirname $0`"