Hypothetic example: There is a number that I will split into x parts (smaller numbers, in a range you see in the example).
I need a way, ideally a one liner for the Linux Bash, to split a large number into unequal smaller numbers like:
54773147129 / 11 = 11702658340 4215060707 8649154648 8166383273 7721726143 6316805625 5074147699 11938331015 7290181592 10452629111 12235301352
24335474529 / 5 = 3782894329 7991597003 2435897896 6966444910 3158640391
120358276480 / 9 = 15276312867 11090117156 8997563892 15321924738 10203261894 21007930376 17164309215 13595762399 7701093943
54773147129 / 8 = 10222423691 6997800027 4434683169 5675683553 1121059020 8522036904 4023455184 13776005581
and so on.
Consider the first example in more detail:
The number is 54773147129 and I want to have 11 parts
I do not want to simply divide the number by eleven, which would result in 11 equal but non-integer fractions, i.e.
not
54773147129 / 11 = 4979377011,73In general, I don't want to have parts with decimals.
I do not want to divide the number into 10 equal parts and one larger part that contains the integer division's modulus, i.e.
not
49793770114979377011497937701149793770114979377011497937701149793770114979377011497937701149793770114979377019I want to have a result like:
117026583404215060707864915464881663832737721726143631680562550741476991193833101572901815921045262911112235301352
How to do this in Bash (ideally in a one-liner)?
11702658340or4215060707derived from54773147129and11? Was the procedure deterministic or was there randomness? If the latter, what is the desired distribution? The topic of this site is Unix & Linux, not mathematics; we may help you with command-line tools (implementation), but give us a strict description of the problem (specification). (2) Regarding command-line tools: what is your research effort? What have you tried?