colrm 從標準輸入讀取資料,移除指定欄位範圍後輸出至標準輸出。適合快速裁剪固定寬度欄位資料。
colrm [起始欄 [結束欄]]
起始欄:從第幾欄開始刪除(含)結束欄:刪除到第幾欄(含),省略則刪除至行尾假設檔案 text.file 內容:123456789
$ colrm 4 < text.file
123
$ colrm 4 6 < text.file
123789
$ colrm 4 6 < text.file > text.file1
cat data.txt | colrm 1 10 | sort