It's fine, we can do it on SunOS. It's a pity there's no switch to print out the names of the created files like there is on Linux systems. Maybe you should convert all you systems to Linux!
I would suggest this approach:
- choose a prefix for the output file names which you know will be unique
- do the split
- use readdir to get a list of the newly created files
Before we can start, can you check that the Sun implementation of split works as I hope?
First, make a test file containing the following text:
Code:
test line 1
test line 2
test line 3
test line 4
test line 5
test line 6
Now run split like this:
Code:
split -l 3 testfile myprefix_
Can you post the output of this command:
If all is well, we can easily get the list of files by reading the directory listing, and filtering for some prefix we have chosen.