I have a simple bash script that prints sth every 5 seconds. What I do is the following. I redirect the output of the script to a file, tail the file and see that it works and then from another console I delete the file where the output is redirected to. Even though I have deleted the file, the tail still works. Stoping the tail and starting it again of course fails because the file is not found.
My question is whether this is normal and does the output go "somewhere" after deleting the file where it is supposed to be redirected.
The file still exists until everything with it open, closes it or quits.
Try truncating it, i.e. overwriting it with nothing, instead of deleting it. Having it open can't prevent that from happening, and tail -f is usually smart enough to seek back to the beginning.