Re-arranging grep in mdls_files if statement

parse-mdls
Mike Holloway 3 years ago
parent e6e16d19cd
commit bf5ad573a2
  1. 2
      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
:

Loading…
Cancel
Save