Reputation: 920
I am executing some commands in guile shell. I want the results of the command written to a file.
I tried something like this:
some command | nc localhost abc >> file.txt
But did not work for me.
Upvotes: 0
Views: 182
Reputation: 920
I tried the following and it worked.
echo -e "(define out (open-output-file \"/opt/ncOutput.txt\"))\n(display \"hello world\" out)\n(close-output-port out)\n" | nc localhost abc
Upvotes: 0
Reputation: 3363
You need to display
the results, in order to redirect them:
guile -c '(display (+ 1 2 3 4)) (newline)' > output
Upvotes: 1