|
| From: | Peng Yu |
| Subject: | How to make `read` fail if there is not enough fields in the input? |
| Date: | Thu, 5 Dec 2019 10:12:17 +0800 |
Iād like to know whether there is enough field in a TSV row. But the status code does not return an error code. Is there a way to let read return non-zero if there is not enough fields? Thanks. $ IFS=$'\t' read -r x y <<< x $ echo $? 0 Regards, Peng
| [Prev in Thread] | Current Thread | [Next in Thread] |