15,041
edits
No edit summary |
|||
| Line 99: | Line 99: | ||
</table> | </table> | ||
== 計算換行符號的數量 == | |||
<pre> | |||
## 計算 \n (不包含 \r\n) 換行符號的數量 | |||
% perl -ne '$count++ if /[^\r]\n/; END{print "純 LF 數量: $count\n"}' YOUR_FILE.txt | |||
## 計算 \r\n 換行符號的數量 | |||
% perl -ne '$count++ if /\r\n/; END{print "CRLF 數量: $count\n"}' YOUR_FILE.txt | |||
</pre> | |||
== 如何取代換行符號 == | == 如何取代換行符號 == | ||