Walt Mankowski on Sun, 19 Nov 2000 20:21:04 -0500 (EST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] dynamic file (script output)


On Sun, Nov 19, 2000 at 06:54:54PM -0500, MaD dUCK wrote:
> i need to create a dynamic file in that a read of the file through
> something like 'cat' will actually execute a script and pretend that
> the script's output to stdout is the actual file data. i tried using a
> FIFO, but there is no easy and reliable way to have the pipe filled
> with the output of exactly one program invocation, no more and no
> less.
> 
> so if i have a file i.e. /tmp/date linked in this way to /bin/date, i
> want the output from the date program when doing a 'cat /tmp/date'.
> 
> any ideas?
> martin

Try using backticks:

$ echo `date`
Sun Nov 19 20:19:31 EST 2000
$

Attachment: pgpcb1uAh9K8h.pgp
Description: PGP signature