Skip to content

Instantly share code, notes, and snippets.

@kunst1080
Created April 10, 2014 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunst1080/10385668 to your computer and use it in GitHub Desktop.
Save kunst1080/10385668 to your computer and use it in GitHub Desktop.
Unix command line utilities for fixed length file - split file by byte
#! /usr/bin/perl
my $length = $ARGV[0];
binmode(STDIN);
while (sysread(STDIN, my $buf, $length)) {
print $buf . "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment