改行なしの固定長ファイルにレングスを指定して改行を入れるperlスクリプトを書いた
必要に迫られて書いた。[flsplit]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/perl | |
my $length = $ARGV[0]; | |
binmode(STDIN); | |
while (sysread(STDIN, my $buf, $length)) { | |
print $buf . "\n"; | |
} |
こんな感じで使います。
|
|