This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# NOTE: To avoid any word splitting or globbing issues you should always try to use double quotes around the variable name | |
# Specify any new extensons or filenames over here that you want monitored for changes | |
FILES_MONITORED=( .+\.jpe?g .+\.png .+\.bmp .+\.JPE?G .+\.PNG .+\.BMP ) | |
# TODO: Update the description | |
if [[ "$#" -eq 0 ]] || [[ "$#" -eq 1 ]]; then | |
printf "Upload program's location must be specified. Directory to be monitored must be specified. \n\ | |
[USAGE]: ./monitor_directory.sh \"directory\" \"path-to-upload-file\"\n\n\ |