📌  相关文章
📜  在 linux shell 脚本中将内容从一个文件复制到另一个文件 - Shell-Bash 代码示例

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

代码示例1
#!/bin/sh
cd test1;
echo "list of files:";
ls;
for filename in *;
do echo "file: ${filename}";
echo "reading..."
exec<${filename}
value=0
while read line
do
   #value='expr ${value} +1';
   echo ${line};
done
echo "read done for ${filename}";
cp ${filename} ../test2;
echo "file ${filename} moved to test2"; 
done