diff --git a/hash-files b/hash-files index 7ef92a3..51821b2 100755 --- a/hash-files +++ b/hash-files @@ -33,13 +33,14 @@ mdls_per_file () { mdls_value=$(printf "%s" $line | cut -d '=' -f 2) if [[ " ${keys_of_interest[*]} " =~ " ${mdls_key} " ]];then IFS=$old_IFS - echo "MDLS Value: $mdls_value" + mdls_properties+=$mdls_value unset IFS else : #echo "Did not print!" fi IFS=$old_IFS done + export $mdls_properties } @@ -79,7 +80,7 @@ IFS=',';echo "${csv_columns[*]}";IFS=$'\n' for file in $(find $Working_Fullpath -maxdepth 1 -type f); do hash=$($md5_bin $file | awk '{ print $4 }') mdls_properties=$(mdls_per_file $file) - echo -e "mdls_properties: \n=======================\n$mdls_properties" + echo -e "============= CSV Row ==========\n$file,$hash,$mdls_properties" # write_per_file $file $hash $mdls_properties done