ctail : ファイルの末尾n行を削って出力する
Usage : ctail [-n] [-]<n> <file> delete the tail
record <n>.
ctail [-n] [-]<n>c <file> delete the tail byte
<n>.
Version : Mon Mar 18 07:41:55 JST 2013
ファイルの末尾3行を削って表示する。
$ cat data
001 北海道
002 東北
003 関東
004 中部
005 近畿
006 中部
007 四国
008 九州
009 沖縄
$ ctail -3 data > result
$ cat result
001 北海道
002 東北
003 関東
004 中部
005 近畿
006 中部例2
009 沖縄 の11文字(ASCII4バイト+漢字2文字6バイト+改行1バイト)
$ ctail -11c data > result
$ cat result
001 北海道
002 東北
003 関東
004 中部
005 近畿
006 中部
007 四国
008 九州