关于shell“ambiguous redirect”
时间:2010-05-26 来源:xjc2694
head -50000 $dir/$file >access_$creatime
date +%m%d-%k%M,由于使用了date的 %k 格式,而且没有使用双引号,凌晨开始,在重定向到以日期为文件名的文件时,出现了错误“ambiguous redirect”
因为%K的格式生成的日志格式名类似于 access_0526- 146
改成使用%H参数,或者将文件名用双引号括起来即可。
说明: The redirect error normally occurs when a wildcard is used or spaces exist in the filename and it hasn't been surrounded by quotes.
因为%K的格式生成的日志格式名类似于 access_0526- 146
改成使用%H参数,或者将文件名用双引号括起来即可。
说明: The redirect error normally occurs when a wildcard is used or spaces exist in the filename and it hasn't been surrounded by quotes.
相关阅读 更多 +