Skip to main content
added 30 characters in body
Source Link

To avoid waiting for input when there's no pipe, test it before reading:
[ -p /dev/stdin ] && read PIPEIN
Tested

[ -p /dev/stdin ] && read PIPEIN

Tested on Ubuntu's Bash 5.

To avoid waiting for input when there's no pipe, test it before reading:
[ -p /dev/stdin ] && read PIPEIN
Tested on Ubuntu's Bash 5.

To avoid waiting for input when there's no pipe, test it before reading:

[ -p /dev/stdin ] && read PIPEIN

Tested on Ubuntu's Bash 5.

added 30 characters in body
Source Link

To avoid waiting for input when there's no pipe, test it before reading:
[ -p /dev/stdin ] && read PIPEIN
Tested on Ubuntu's Bash 5.

To avoid waiting for input when there's no pipe, test it before reading:
[ -p /dev/stdin ] && read PIPEIN

To avoid waiting for input when there's no pipe, test it before reading:
[ -p /dev/stdin ] && read PIPEIN
Tested on Ubuntu's Bash 5.

Source Link

To avoid waiting for input when there's no pipe, test it before reading:
[ -p /dev/stdin ] && read PIPEIN