I would like to do something as simple as:
grep AA < box.inp > box.out
run. Is the only way to do this one of the cumbersome options discussed here?
pipeline etc?) Or is there a simple alternative? I do not need even to store the output of the command in the section, just run it as an external command.
I think you should indeed use
pipeline for that. As the documentation for
pipeline to control I/O redirection.
But it’s not that bad?
pipeline("box.inp", `grep AA`, "box.out") |> run
That does not work for the command I am actually trying to run (instead of
grep), probably because some difference related to how it outputs the data.
What is working is this:
output = @capture_out run(pipeline(`cat processed.top`,`plumed partial_tempering $(λ[i+1])`))
open("$out/topology.top","w") do io
Maybe someone who understands what this
capture does might have any idea of what is going on.
Nobody invented a macro like:
@sh grep AA < box.inp > box.out
to just call a shell? Given that
; gets one into a shell where that works, seems feasible, isn’t it?
Well you can do
run(`bash -c "grep AA < box.inp > box.out"`)
But can you give more information on what fails with
run(pipeline("processed.top", `plumed partial_tempering $(λ[i+1])`, "$out/topology.top")) ?
Sure, apparently what was failing was my capacity to read a user guide.