Is there any way to pass data into line.run as STDIN? Similar to using the pipe operator | in CLI apps like ls | grep '\.txt$', where the output of the command ls is directed as STDIN to grep?
using the `ls | grep '\.txt$' example, that would be inserting whatever I'd want to pass into grep as STDIN somewhere when running the command:
line = Terrapin::CommandLine.new("grep", "'\.txt$'")
line.run
If it is by design to to exclude the ability for passing STDIN using Terrapin because of saftey, that would be good to know. A different tool may be a better option to do what I'm trying to do, such as IO.popen.
Is there any way to pass data into
line.run
as STDIN? Similar to using the pipe operator|
in CLI apps likels | grep '\.txt$'
, where the output of the commandls
is directed as STDIN togrep
?using the
`ls | grep '\.txt$'
example, that would be inserting whatever I'd want to pass intogrep
as STDIN somewhere when running the command:If it is by design to to exclude the ability for passing STDIN using Terrapin because of saftey, that would be good to know. A different tool may be a better option to do what I'm trying to do, such as
IO.popen
.