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