Generic scripts to sftp files: https://vollett.net/wp-content/uploads/2018/10/sftp.zip sftp.zip contains: 1) sftp_batch_job.sh: Wrapper script that reads GHAW_IIS_001 file and for each line within calls… 2) sftp_files.sh: Issues SFTP commands 3) GHAW_IIS_001: List of SFTP instructions that make up the batch job

Validates a date in YYYYMMDD format # EOM_DATE debug echo “$(now): Validating EOM_DATE: $EOM_DATE” CHK_YEAR=${EOM_DATE:0:4} CHK_MON=${EOM_DATE:4:2} CHK_DAY=${EOM_DATE:6:2} debug echo “$(now): CHK_YEAR: $CHK_YEAR” debug echo “$(now): CHK_MON: $CHK_MON” debug echo “$(now): CHK_DAY: $CHK_DAY” cal $CHK_MON $CHK_YEAR 2> /dev/null | grep -q …

UNIX validate date Read more »

find <ROOT_SEARCH_DIR> -name “<WILDCARD_FILNAME>” -mtime <DAYS SINCE LAST MODIFIED> -type f -exec rm -f {} \; e.g: find /home/users/svollett/test_purge -name “FILE_A*.txt” -mtime -1 -type f -exec rm -f {} \;