I have a file containing numeric data. Each line has a varying number of columns. I want to Split the file in to multiple files based on number of columns in a Line. Each Line may have columns varying from 1-10
Below is a sample Input
file.txt
23 53;
34;
31 45 67;
46 78 95;
34 17;
19;
37 65 83;
Target Output
file_1column.txt
34;
19;
file_2column.txt
23 53;
34 17;
file_3column.txt
31 45 67;
46 78 95;
37 65 83;