Bash: read a file line-by-line and process each segment as parameters to other prog

后端 未结 3 1469
轻奢々
轻奢々 2020-12-02 16:48

I have some dirty work to do, so a Bash script seems to be a good choice. I\'m new to Bash, and the experience makes me kind of frustrated.

The file mapfiles.txt con

3条回答
  •  天涯浪人
    2020-12-02 17:36

    You can simplify this a lot:

    while read file key log lat
    do
      echo "$cmd" "$key" "$log" "$lat" "$file"
    done < "$input"
    

提交回复
热议问题