Say I'd like to use the file -f - command inside a script, and send some input using the stdin, when I'm finished I'd like to terminate it gracefully, but unfortunately I haven't found any way to do this (and yes I did read the man page :) ).
file(1) command termination when using the -f - option
command line;files;stdin
You only need to send EOF signal when you finished. To do that, you need to press CTRL + D:$ file -f -test.pytest.py:       a /usr/bin/python script, ASCII text executabletest.pl  test.pl:       a /usr/bin/perl script, UTF-8 Unicode text executable<CTRL + D here>or you can send to file inside shell script via HERE DOC:file -f - <<EOFtest.pltest.pytest.awkEOF