Hi! I'm glad it worked! Looks like I need to work on making my scripts more universal...
>> First in the first line you wrote /sh is that something else then /bash
/bin/sh on most systems is actually a link to /bin/bash on many systems. sh is the basic shell, the predecessor to bash.
>> second in the first if section you wrote exit 1 (What does the 1 do??)
The "1" is the exit status. It's not really necessary in this case unless you plan on taking some other action based on the exit status. 1 means 'error'
>> and last in the last line you used {}, I had to remove does.
>> tail -n $lines $file And I used this.
That's odd. I thought that the {brackets} were a universal thing. Typically they're used if your variable is included in the middle of some other text, to provide some separation. They're not necessary in this case though, so removing them works great.
>> and mayby a very stupid question.
No such thing!
>> For remarques I learned to use 1#, you used ## is there a differents.
No difference, just a bad habit on my part

You only need 1#