I am totally trying to leach of your brain matter. We run AIX and sometime we get huge text files that we need to split into say four equal (or near equal) parts. We use the csplit command to do this. For instance I just di the following for file BIGFILE:
$: wc BIGFILE
3322657 176809963 3623691354 BIGFILE
So I divided 3322657 by four, did some rounding and addition to get my csplit starting points and then did:
$: csplit pdc_txt_P0055.txt 830664 1661328 2491992
Which got me four fractions of the original data. Can someone show me how to script this out so my ops could just enter a file name and enter the number of parts to split it into?
$: wc BIGFILE
3322657 176809963 3623691354 BIGFILE
So I divided 3322657 by four, did some rounding and addition to get my csplit starting points and then did:
$: csplit pdc_txt_P0055.txt 830664 1661328 2491992
Which got me four fractions of the original data. Can someone show me how to script this out so my ops could just enter a file name and enter the number of parts to split it into?