用sed 指令即可刪除檔案內的空白行: $ sed -i '/^$/d' input.txt. 如果想將刪除空白行後的內容, 匯入到新檔案, 要改成這樣: $ sed '/^$/d' input.txt ...
確定! 回上一頁