Is there an option or a way with the split command to rename the partitioned files with a counter. For example, can the files testaa, testab, testac be renamed to test1, test2, test3 from the split command without explicilty renaming files.
Thanks,
awk
November 11, 2008, 2:07pm
2
Try man csplit -
The csplit command writes the segments to files xx00 . . . xx99, depending on how many times the Argument parameter is specified (99 is the maximum).
I checked man on split - didn't have a similar option.
So let's say I have a file test.dat with four records and I want to split it into 2 partitions. What is the syntax of csplit in this case.
Thanks,
drl
November 11, 2008, 3:03pm
4
Hi.
The GNU/Linux version of split allows numeric:
-d, --numeric-suffixes
use numeric suffixes instead of alphabetic
-- excerpt from man split, version split (coreutils) 5.2.1
I did not see that the split in HP-UX B.11.00 or Solaris 10 had those options.
If one is ambitious, there is a perl version of split at html/commands/split/split.lafferty - metacpan.org which one could modify to do whatever one wants ... cheers, drl