The echo gives me a number, which it's supposed to do.
The addition is used to round up the numbers: 231.2 becomes 232, but 231.0 stays 231.
I tried it again with the $x variable explicitly defined and then it worked. So the problem seems to be $x. (sorry, I didn't get much sleep last night

) This changes my question:
If I want to use my script with the original text file as input (like this: sh test.sh < file.txt), how do I call on the original file inside the script?
I obviously thought that the $x in 'split $x -d -l $y split/$x' would be replaced with 'file.txt', but it's not.