1 # usage: touch_date <unix ts> <file>
4 touch -t `date -r $1 +%Y%m%d%H%M.%S` "$2"
7 # usage: last_modified <file>
13 # usage: format_last_modified <file>
14 format_last_modified()
16 stat -f "%Sm" -t "%Y-%m-%d %H:%M:%S %z" "$1"
19 # usage: head_n [count]
22 if [ "$1" -gt 0 ]; then
30 openssl dgst -sha1 "$1" | sed "s,SHA1.\(.*\).= \(.*\),\2 \1,"
33 # usage: cp_a <src> <dst>
53 n1=$((${2} - ${1} + 1))
61 /usr/bin/awk -v n1=$num1 -v n2=$num2 -v add=$incr 'BEGIN{ for(i=n1; i<=n2; i+=add) print i;}' | /usr/bin/sed -E '/e/s/^.+e.+$/0/'