On branch master
Changes to be committed: modified: hash-files Added functionality to create file list Added cleanup function and trap call
This commit is contained in:
parent
1e9b217612
commit
eb629b225c
18
hash-files
18
hash-files
@ -17,7 +17,7 @@ echo "=== Get list of files in $Working_Directory. ===
|
|||||||
=================================================="
|
=================================================="
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
for file in $(find $Working_Fullpath -maxdepth 1 -type f); do
|
for file in $(find $Working_Fullpath -maxdepth 1 -type f); do
|
||||||
list_of_files+=$file
|
list_of_files+=( $file )
|
||||||
done
|
done
|
||||||
unset IFS
|
unset IFS
|
||||||
}
|
}
|
||||||
@ -37,12 +37,28 @@ echo "=== Write data to a .csv file. ===
|
|||||||
===================================="
|
===================================="
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cleanup () {
|
||||||
|
:
|
||||||
|
}
|
||||||
|
|
||||||
## Main
|
## Main
|
||||||
#######
|
#######
|
||||||
|
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
echo "Main Start"
|
echo "Main Start"
|
||||||
create_list_of_files
|
create_list_of_files
|
||||||
|
for file in ${list_of_files[@]}; do
|
||||||
|
echo $file
|
||||||
|
done
|
||||||
write_log
|
write_log
|
||||||
|
hash_files
|
||||||
|
write_log
|
||||||
|
create_csv
|
||||||
|
write_log
|
||||||
|
write_data
|
||||||
|
write_log
|
||||||
|
cleanup
|
||||||
|
|
||||||
#while $list_of_files >=1; do
|
#while $list_of_files >=1; do
|
||||||
#done
|
#done
|
||||||
|
Loading…
Reference in New Issue
Block a user