[PATCH v2] kdumpctl: fix infinite loop caused by running under bash