|
|
@ -75,14 +75,16 @@ for key in ${keys_of_interest[@]};do |
|
|
|
csv_columns+=( $key ) |
|
|
|
csv_columns+=( $key ) |
|
|
|
done |
|
|
|
done |
|
|
|
## Print columns to first line of csv |
|
|
|
## Print columns to first line of csv |
|
|
|
echo "======= CSV Columns ========" |
|
|
|
#echo "======= CSV Columns ========" |
|
|
|
IFS=',';echo "${csv_columns[*]}";IFS=$'\n' |
|
|
|
{ IFS=',';echo "${csv_columns[*]}";IFS=$'\n' |
|
|
|
## Loop through files, writing to csv |
|
|
|
## Loop through files, writing to csv |
|
|
|
for file in $(find $Working_Fullpath -maxdepth 1 -type f); do |
|
|
|
for file in $(find $Working_Fullpath -maxdepth 1 -type f); do |
|
|
|
hash=$($md5_bin $file | awk '{ print $4 }') |
|
|
|
hash=$($md5_bin $file | awk '{ print $4 }') |
|
|
|
mdls_properties=$(mdls_per_file $file) |
|
|
|
mdls_properties=$(mdls_per_file $file) |
|
|
|
echo -e "============= CSV Row ==========\n$file,$hash,$mdls_properties" |
|
|
|
# echo "============= CSV Row ==========" |
|
|
|
|
|
|
|
echo "$file,$hash,$mdls_properties" |
|
|
|
# write_per_file $file $hash $mdls_properties |
|
|
|
# write_per_file $file $hash $mdls_properties |
|
|
|
done |
|
|
|
done |
|
|
|
|
|
|
|
) >> $temp_csv_file |
|
|
|
|
|
|
|
cat $temp_csv_file |
|
|
|
unset IFS |
|
|
|
unset IFS |
|
|
|