Trim in Unix command

在Unix環境下去把檔案中每一行頭尾的空間trim走....

sed 's/^[ \t]*//;s/[ \t]*$//' source.txt > output.txt

0 回應:

Post a Comment