This question already has an answer here:
I have this idea and maybe it is not feasible, but I think it worth asking.
Let's say a user is running this command:
Whenever something tries to read from this file, I would like to run a script or command in the background instead and return the response of that script as content.
Somehow like doing:
ln -s /folder /symlink
But for scripts (idea of what I have in mind):
symlinkcommand /filepath/file.txt "command to run"
Hope I made myself clear. Please reply with your ideas and suggestions if any.