I’d like to run some code through a binary via stdin and paste the output. The language is foma, is there a fast way for that or do I have to write my own definition? I’ve tried http://sprunge.us/DjOV, but that gives me a if: Wrong type argument: stringp, (:colname-names).
I’d like to run some code through a binary via stdin and paste the
Share
If foma could be run an a file (rather than STDIN), then simply evaluating the following function definition should work. This will write
bodyto a temporary file, callfomaon that file and return the output (collected from STDOUT).If
fomainsists on taking input through STDIN, then you could replacefomaabove with something likefoma-helperwherefoma-helperis a shell script holding something likeHope this helps