On branch parse-mdls

Your branch is up to date with 'origin/parse-mdls'.

 Changes to be committed:
modified:   hash-files
	Added effective test for mdls_key in keys_of_interest.
parse-mdls
Mike Holloway 2 years ago
parent 2729af8349
commit d6bc8b84b3
  1. 7
      hash-files

@ -34,13 +34,18 @@ create_list_of_files () {
mdls_files () {
for file in $list_of_files; do
for line in $(mdls $file); do
old_IFS=$IFS
unset IFS
mdls_key=$(printf "%s" $line | cut -d '=' -f 1)
mdls_value=$(printf "%s" $line | cut -d '=' -f 2)
if $(echo $keys_of_interest | grep $mdls_key);then
if [[ " ${keys_of_interest[*]} " =~ " ${mdls_key} " ]];then
IFS=$old_IFS
printf "\n============================\nMDLS Key: %s\nMDLS Value: %s\n============================\n\n" $mdls_key $mdls_value
unset IFS
else
echo "Did not print!"
fi
IFS=$old_IFS
done
done

Loading…
Cancel
Save