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?
Depending on how your program reads the file, you might be able to use a named pipe, but it's very likely that it won't work; named pipes are not random access.