Here is the situation:
- I have an api call, it requires MFA input
- I want the output of the api call to go to a file
- I want just the MFA prompt to go to STDOUT (edit: Before process termination. I want to react to the prompt)
I think this is what I want:
some api call | STDOUT | grep "mfa subtext"
| cat > outfile.txt
A single process that forks its pipes to two different locations that process things differently.
Also, some api call
requires a user input that cannot be automated (a MFA prompt).
And I'm totally stuck
- This question has a very nice way to do multiple pipes in python, but I can't figure out how to get this to work without forking the pipes
some api call | tee outfile.txt
feels tantalizingly close, but I can't figure out how to not dump the giant response to STDOUT as well.