谁能告诉我下面的bash代码出了什么问题?
for f in $FILES
do
cut -d, f1-7 < $f > $f.tmp
done当我在循环中运行
echo "cut -d, f1-7 < $f > $f.tmp"我得到了正确的命令输出,当我自己运行该命令时,它工作得很好。但是当我在bash循环中运行它时,它不工作,我得到以下错误:
cut: you must specify a list of bytes, characters, or fields
Try `cut --help' for more information.有什么想法吗?
发布于 2012-09-22 22:10:17
我认为您在cut命令中遗漏了一个减号:
cut -d, -f1-7 < $f > $f.tmphttps://stackoverflow.com/questions/12544429
复制相似问题