In Linux, I would like to create a file where the contents of the file are dynamically generated by the output of a program.
The examples which already exist are /dev/random /dev/urandom, /dev/zero, etc...
I would like to create a file such as /home/sam/currentdate.txt where by the contents of the file are the result of running a command (such as date, and would read:
[sam@myserver ~]$ cat ./currentdate.txt
Wed Dec 2 12:12:09 PST 2015
[sam@myserver ~]$
For my use case, I need to track the output of certain programs by another program which can not read the contents of a program's output, but rather the contents of a file. I can save the contents of the output via a script by using date > filename.txt but that requires saving the output to disk first, which is going to be inefficient in my use case.