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

How to pipe with different contexts? #99

Open
dannys42 opened this issue Feb 4, 2021 · 0 comments
Open

How to pipe with different contexts? #99

dannys42 opened this issue Feb 4, 2021 · 0 comments

Comments

@dannys42
Copy link

dannys42 commented Feb 4, 2021

Thanks for the great library! Is there a way to do the equivalent of "(cd srcdir && tar cf - . ) | (cd dstdir && tar xf - )" ?

I'd like to do this following this pattern:

var file = try open(forWriting: "output.txt")
runAsync("cmd1", "arg1").stdout.runAsync("cmd2").stdout.write(to: &file)

Rather than simply doing bash execution to prevent unintended string manipulation. Do you have a recommendation on how to approach this?

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