Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way that to pass STDIN into line.run? #28

Open
cdesch opened this issue Dec 23, 2023 · 0 comments
Open

Is there any way that to pass STDIN into line.run? #28

cdesch opened this issue Dec 23, 2023 · 0 comments

Comments

@cdesch
Copy link

cdesch commented Dec 23, 2023

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 intogrep` 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant