如下命令: sed 's/^ *//' file1.txt > file2.txt 转载于:https://www.cnblogs.com/chenwenyan/p/8998730.html