Unix File Lock: flock
To obtain a lock on a file, use flock command as per example:
To obtain a lock on a file, use flock command as per example:
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 …
awk -F ‘{print NF-1}’ e.g.: awk -F: ‘{print NF-1}’ SUMM_DQ_KEY_ISSUE.osh
To enter the ^M character in unix enter the following: Control-V Control-M
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 {} \;
http://www.tutorialspoint.com/unix_commands/xmllint.htm