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:
cat ~/file.txt
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.
Thanks.
cat /etc/passwd
will return thepasswd
file but the password hashes scrambled or cleared ? If you can tell what you are trying to accomplish instead of beating around the bush, you may get better suggestions. – MelBurslan May 02 '16 at 13:56