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 does read builtin survive the pipe stdin redirection? #6

Open
Babagilo opened this issue Mar 24, 2021 · 0 comments
Open

How does read builtin survive the pipe stdin redirection? #6

Babagilo opened this issue Mar 24, 2021 · 0 comments

Comments

@Babagilo
Copy link

Hi, guys,

I tried to add some interactivity to allow user to abort or continue an operation by using the read command which is similar to below existing statement:

read -p "Do you want to prune (permanently delete) all the orphaned node instances? (N/y): " -n 1 -r

But the problem is that if the treetool is running alone, the read builtin will prompt the user as expected, but when it is piped with another treetool command, then the prompt is not happening.

I guess it's because read by default only prompts to stdin, but when the redirection pipe happens, something happened and such user interface is suppressed. But I don't know how to fix it.

Please advise.

Regards,
Babagilo

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