Board logo

标题: [问题求助] Shell脚本合并文件如何输出windows的换行 [打印本页]

作者: netdzb    时间: 2019-6-2 10:30     标题: Shell脚本合并文件如何输出windows的换行

  1. #!/bin/bash
  2. for FILE in *.txt;
  3.     do
  4.        cat "$FILE">>total.txt
  5.        echo \r\n>>total.txt
  6.     done
复制代码
--------------------------------------

这个脚本输出的是linux的回车换行。
作者: Batcher    时间: 2019-6-2 12:22

echo -e
加个 -e 试试可以吗




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2