循环遍历文件路径列表以作为输入发送到脚本

时间:2017-08-02 03:37:51

标签: bash

#Create list of files with a ext
#Loop through list of flies in list.txt and pass to myscript
    find /directory -name "*.gz" > list.txt
    for f in `cat list.txt`
    do
        $myscript -S \
            --g ${f} \
            --s ${filename2} \
            --og ${outfile}_${f} \
            --os ${outfile}_${f}.sample
   done;

我收到错误,说输入(文件路径)是"未知参数"它似乎放了一个" _"在它面前。我是否错误地设置了变量?错误是--g arg。 $ Myscript是程序的路径。文件列表中的空格和以/ home /目录/...

开头的行中的每个文件都没有空格

0 个答案:

没有答案
相关问题