Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
split a file with headers and trail
Name: Pradeepa Date: October 23, 2008 at 03:39:23 Pacific OS: UNIX CPU/Ram: 1 GB
Comment:
Hi,
I will have to split a 4 MB file into four 1 MB files. But the problem here is the first line is a header and the last line is a trailer. In between I have second level header which can repeat (2HDR) and under each 2HDR there can be any number of other lines and a second level trailer (2TRL).When the file is split, and one 2HDR should have its 2TRL in the same file. One set can be as small as 200KB and as big as 1 MB.
Summary: In a ksh script I get a file with a path from another program. I need to create the file and it's directories. I know mkdir -p can make the dirs but how to get the dirs without the filename? TIA Keith...
Summary: Hi, I am trying to split a file which has fixed 10 rows into two files in PERL. The first 5 rows into fileA and the last five rows into fileB. I have to do this in a loop because I have multiple files...
Summary: Ultimatly Perl or Python would be better suited for such a task. I typically use Perl. They are both more extensible and powerful. But in computing you get what you ask for and you said shell:-) So I ...