On branch parse-mdls

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

 Changes to be committed:
modified:   hash-files
	Integrated functionality from mdls-parse subfunction into
	mdls_files
deleted:    mdls-parse
	Deleted; Integrated into hash-files
parse-mdls
Mike Holloway 3 years ago
parent 62f093dd89
commit 8a9f48481f
  1. 9
      hash-files
  2. 15
      mdls-parse

@ -33,9 +33,12 @@ create_list_of_files () {
mdls_files () { mdls_files () {
IFS=$'\n' IFS=$'\n'
for file in $list_of_files; do for file in $list_of_files; do
echo "=== mdls info === for line in $(mdls $file); do
===========" mdls_key=$(printf "%s" $line | cut -d '=' -f 1)
mdls $file mdls_value=$(printf "%s" $line | cut -d '=' -f 2)
printf "\n============================\nMDLS Key: %s\nMDLS Value: %s\n============================\n\n" $mdls_key $mdls_value
done
done done
} }
hash_files () { hash_files () {

@ -1,15 +0,0 @@
# Bash Subfunction
## ToDo
## - .env file should support list of keys
## - Script should support filtering output based on list of keys in .env
oldIFS=$IFS
IFS=$'\n'
for line in $(mdls .env); do
mdls_key=$(printf "%s" $line | cut -d '=' -f 1)
mdls_value=$(printf "%s" $line | cut -d '=' -f 2)
printf "\n============================\nMDLS Key: %s\nMDLS Value: %s\n============================\n\n" $mdls_key $mdls_value
done
unset IFS
Loading…
Cancel
Save