Seems that i did it the wrong way still from the beginning. I did it now with open and write an empty file. But anyway i would wish to know if it is possible to terminate a running cat. Thank you all.