|
|
@ -28,6 +28,12 @@ create_list_of_files () { |
|
|
|
unset IFS |
|
|
|
unset IFS |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mdls_files () { |
|
|
|
|
|
|
|
IFS=$'\n' |
|
|
|
|
|
|
|
for file in $list_of_files; do |
|
|
|
|
|
|
|
mdls $file |
|
|
|
|
|
|
|
done |
|
|
|
|
|
|
|
} |
|
|
|
hash_files () { |
|
|
|
hash_files () { |
|
|
|
#echo "=== Hash files. === |
|
|
|
#echo "=== Hash files. === |
|
|
|
#======================" |
|
|
|
#======================" |
|
|
@ -73,13 +79,14 @@ trap cleanup EXIT |
|
|
|
|
|
|
|
|
|
|
|
echo "Main Start" |
|
|
|
echo "Main Start" |
|
|
|
create_list_of_files |
|
|
|
create_list_of_files |
|
|
|
hash_files |
|
|
|
mdls_files |
|
|
|
if [ ${#list_of_files[@]} != ${#list_of_hashes[@]} ];then |
|
|
|
#hash_files |
|
|
|
echo "Error! Number of files and hashes differs. Exiting..." && exit |
|
|
|
#if [ ${#list_of_files[@]} != ${#list_of_hashes[@]} ];then |
|
|
|
else |
|
|
|
# echo "Error! Number of files and hashes differs. Exiting..." && exit |
|
|
|
create_csv |
|
|
|
#else |
|
|
|
fi |
|
|
|
# create_csv |
|
|
|
write_data |
|
|
|
#fi |
|
|
|
|
|
|
|
#write_data |
|
|
|
|
|
|
|
|
|
|
|
#while $list_of_files >=1; do |
|
|
|
#while $list_of_files >=1; do |
|
|
|
#done |
|
|
|
#done |
|
|
|