2

<() doesn't seem to do what I expect.

This command requires a text file (it's JLinkExe, the text file contains commands for JLinkExe to run. But that shouldn't matter).

JLinkExe -CommanderScript <scriptfile>

I need to create the files dynamically, since their content depend on what I'm currently trying to achieve.

My current solution is to create a temporary file, fill it with content with printf, then call the JLinkExe command with that temporary file.

I have a feeling that this should be achievable with <(), but I don't succeed.

This doesn't work:

JLinkExe -CommanderScript <(printf "ShowEmuList\nexit\n")

I was expecting <() to create a temporary file descriptor, with the content of the file being the string. It works with cat, but JLinkExe complains the it cannot read the command file.

Am I wrong, or is it just that JLinkExe is stupid (it doesn't take stdin)?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
Gauthier
  • 870

0 Answers0