Issue
I am running a bash script which reads certain values from STDIN. I have seen several folks hit the same error without any clear resolution or a resolution that worked for me.
set -x
./.clean
{ set +x; } 2> /dev/null
read -p "Avoid using a public cloud: [yn]? " avoidloud
The above read command gives a
read: read error: 0: Resource temporarily unavailable
Any help is appreciated.
Re-directing did not help either.
Solution
Can you try this for redirection?
exec 3<&0 </dev/null
read -r avoidloud<&3
Answered By - Derviş Kayımbaşıoğlu