From bf5ad573a201ad3d854eb3da7637030f55fc30ab Mon Sep 17 00:00:00 2001 From: Mike Holloway Date: Sat, 26 Mar 2022 15:21:33 -0400 Subject: [PATCH] Re-arranging grep in mdls_files if statement --- hash-files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash-files b/hash-files index 0adc8a0..e13e447 100755 --- a/hash-files +++ b/hash-files @@ -37,7 +37,7 @@ mdls_files () { for line in $(mdls $file); do mdls_key=$(printf "%s" $line | cut -d '=' -f 1) mdls_value=$(printf "%s" $line | cut -d '=' -f 2) - if $(grep $mdls_key $keys_of_interest);then + if $(echo $keys_of_interest | grep $mdls_key);then printf "\n============================\nMDLS Key: %s\nMDLS Value: %s\n============================\n\n" $mdls_key $mdls_value else :