ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I bet that file is a fixed-length record file given there are no CR+LF or LF line terminators. If so, then try the split Linux command. An excerpt of the man page is as follows:
SPLIT(1) User Commands SPLIT(1)
split - split a file into pieces
split [OPTION] [INPUT [PREFIX]]
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is ‘x’. With no INPUT, or when
INPUT is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
use suffixes of length N (default 2)
put SIZE bytes per output file
put at most SIZE bytes of lines per output file
use numeric suffixes instead of alphabetic
put NUMBER lines per output file
print a diagnostic to standard error just before each output file is opened
--help display this help and exit
output version information and exit
SIZE may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P,
E, Z, Y.
I bet you want the --bytes option. You can also do some other useful things with the dd command.