79591668

Date: 2025-04-25 01:27:44
Score: 1
Natty:
Report link

Turns out, I was doing it right with the -d switch. However, bash's read exits with code 1 when it encounters EOF. Documented behavior, explained [here|/questions/40547032]... (Makes sense, actually, as it allows you to loop over text with while read ... )

Because I want the -e to catch all unexpected failures, I modified the parsing line to ignore the expected one: read -r -d '' num1 num2 name <<< $data || :, as suggested by @pjh in his comment, and now the script works properly.

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • User mentioned (1): @pjh
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: Mikhail T.