I have a proprietary command-line program that I want to call in a bash script. It has several options in a .conf file that are not available as command-line switches. I can point the program to any .conf file using a switch, -F.
I would rather not manage a .conf file separate from this script. Is there a way to create a temporary document to use a .conf file?
I tried the following:
echo setting=value|my_prog -F -
But it does not recognize the - as stdin.
You can try
/dev/stdininstead of-.You can also use a here document:
Finally, you can let bash allocate a file descriptor for you (if you need stdin for something else, for example):