Edit: I thought OP was asking about a script developed on company time. As that is not the case, some parts of the answer are referencing this wrong. Just replace those in your mind with - It's almost certain that script belongs to you and not the company, unless some regulation explicitly states that you may not work on company related topics at home, which I would not expect.
You are asking about at least three completly different topics here, so firstly, let me split that up.
I wonder if my script is patentable or it can be protected somehow in European Comunity.
I don't want to diminish your work, but I'd say, the chances are bad. In principle, the combination of known components can be patentable, but if it is the pure implementation of a known method, - meaning just the automation of something done exactly (or almost exactly) the same way by hand - in most cases, that won't be enough. The special case could be answered only by a patent attorney. BUT:
I dont want the company to make use of it at 0 cost, my long intership has already been free.
This depends on the company's regulations, on the country you are in and on your contract. You are working for the company, so what you develop on company time for the company is normally not yours or not only yours. Many companies have policies regarding inventions of employees. I don't know about yours of course.
What could you do?
Probably, there is some way to file a notice of invention in your company. Then your invention will enter the companies invention process and in the end, they will either tell you that you don't own any rights (you could double check that with an attorney), tell you they don't want to pursue this invention, then you could do that yourself (probably, again) or try to protect it and maybe pay you some royalties for using it.
Tbh, I'd expect a certain kind of arrogant rection from your bosses telling you that it's not that big of a deal etc. etc. At that point you could either leave it or push for filing that notice of invention. It might, however, not end with you and them beeing friends at the end. Note, this is just what I think is most likely if you push it, but you could try asking nicely to see how they react.
As they did not pay you, you might have chances of forbidding them the usage of your script, but if it's not patentable then they could just reimplement it.
Can I protect it somehow? I fear i cant due to the use of other open source applications and linux license itself..
For this you would have to read all those licenses. A patent however protects the method, not the implementation, so patenting something is unrelated to this part. You can patent soemthing which you may not be allowed to use later or where you might not be allowed to actually commercially use the implementation if done in a certain way or with certain software.
Conclusion:
You need to find out if the script is patentable, start with reading about patentability, novelty and inventive step and then do your own analysis and/or ask specific questions, I couldn't tell from this question alone.
And you need to find out if what you invent on company time is your property or theirs. again, can't help you, you need to find out - read the regulations for your company, they should be somewhere (intranet?) or ask your boss/coworkers.
Keep in mind, most companies think of an internship as something they do for you, not the other way around, so they might not be amused if you want to forbid them / to pay for what you invented in the time where they paid you with learning from their greatness and teaching you, the little intern and tell you it's not worth that much anyways. (Sarcasm, sorry)
Copyright: your script is protected by copyright, so if there is no regulation (legal or contractual) that says the company owns what you produce, you may forbid them to use the script you wrote. However, they could just have someone else write a similar script.
What I would try: Get hired and see this as proof of your usefullness and forget about it, imho the bridges you might burn and the attorneys fees if they don't cooperate are way worse than what they would pay you in the best case. If you really want, ask really really nicely if they want to pay you for implementing a linux environment and the script and teaching the employees how to use it or ask how they see the question who the script belongs to and tell them that, if the script is useful for them, you would like to get paid for it, that should be something everyone can understand.