📜  linux 将文件中的每一行写入新文件 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:30.815000             🧑  作者: Mango

代码示例1
for line in $(cat file.txt); do echo "${line}" > "directory/filename_${i}.txt"; i=$(( $i + 1 )); done