I have a command line program that is expecting to be passed a configuration file e.g.
sphinx --config /some/config_file
I'm calling this command from inside a ruby program where I'm currently dynamically generating the config file before writing it to disk, this seems like a waste as the file is only every used once and just deleted again straight after.
I was wondering if there's a way to avoid writing the file to disk and just passing in something that the program will think is a file but really hasn't been written to disk?
sphinx
makes available. Many unix-y utilities are able to accept input via STDIN, but I'm not sure if that's the case with this utility. If anything, you could just make a very small ramdisk and write the file there. That would be very fast.