【发布时间】:2019-02-12 18:39:53
【问题描述】:
我在 HP-UX 机器中遇到此错误
+ IFS=;
/home/machine1/folder/borrado_de_logs.sh[45]: read: A specified flag is not valid for this command.
我正在使用这段代码
head -1 $rutatemporal/logfechas.log > $rutatemporal/cabecera.txt
cabecera=`cat $rutatemporal/cabecera.txt`
IFS=';' read -a arreglo<<EOF
$cabecera
EOF
在 Hp-UX 中似乎不允许使用 read -a
read 应该使用什么参数?
cabecera.txt 的内容是这样的:
2019-02-01;/home/user/deletelogs/somelog.log
【问题讨论】: