Hello Kairui,
-----Original Message-----
Replace $(cat ...) with $(< ...) which help improve the
performance.
Signed-off-by: Kairui Song <kasong(a)redhat.com>
---
dracut-module-setup.sh | 6 +++---
kdump-lib.sh | 10 +++++-----
kdumpctl | 6 +++---
mkdumprd | 3 +--
4 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index a186570..6a13f53 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -94,7 +94,7 @@ kdump_setup_dns() {
_dns=$(echo $_nameserver | cut -d' ' -f2)
[ -z "$_dns" ] && continue
- if [ ! -f $_dnsfile ] || [ ! $(cat $_dnsfile | grep -q $_dns) ]; then
+ if [ ! -f $_dnsfile ] || [ ! $(< $_dnsfile | grep -q $_dns) ]; then
Does this pipeline pattern work expectedly?