File size: 711 Bytes
31d1d47 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
#!/bin/bash
# Set dataset directory
DATASET_DIR="diabetic-retinopathy-dataset"
# Function to log messages
log() {
echo "$(date +"%Y-%m-%d %H:%M:%S") $1"
}
# Function to merge zip parts
merge_zip() {
local zip_name="$1"
log "Merging $zip_name parts into a single zip file..."
cat "$DATASET_DIR/$zip_name".zip.* > "$DATASET_DIR/$zip_name.zip"
log "Merged $zip_name.zip created at $DATASET_DIR"
# remove partition files
rm "$DATASET_DIR/$zip_name".zip.*
log "Removing $zip_name parts"
}
# Merge train.zip parts;
merge_zip "train" &
# Merge test.zip parts
merge_zip "test" &
# End of script
log "Script execution completed."
# Wait for all background processes to finish
wait |