# # ********************* # $ bash "$d_bin"'strings.sh' - just a mish-mash dummy file with general format for bash scripts # str_reverse(str) - reverse-order str # str_get_length() - number of characters (number of bytes with -c) # str_get_subStr() - # date - functions return string [date_ymd, date_ddmmmyyyy, date_ymdhm] # get_UnixSec1970() - standard Unix timecode # date expressions [date_ymd[, hm[s]], ddmmmyyyy[,_hm[s]], copy-paste expression into [cmdLin, script] : # date_ymd=$(date +%0y%0m%0d) # date_ymdhm=$(date +"%0y%0m%0d %0kh%0Mm") # date_ymdhms=$(date +"%0y%0m%0d %0kh%0Mm%0Ss") # date_ddmmmyyyy=$(date +%0e%0b%0Y) # %0B - full name of month # date_ddmmmyyyy_hm=$(date +"%0e%0b%0Y %0kh%0Mm") # date_ddmmmyyyy_hms=$(date +"%0e%0b%0Y %0kh%0Mm%0Ss") # statDate_to_timeUnix() - convert to linux stat format to timeUnix # yymmddhms_to_timeUnix() - convert to linux stat format, then $ date -d "$timeStat" +%s # note only works from 01Jan2000-present # timeUnix_tests() - I need to established fixed test file # tPthP_get_tDeltaDays() - returns days between file modified dates # yymmddhhmmP_to_tDeltaUnix() - returns the number of minutes between dates in YYMMDD_HM format # mmddYYY_to_ddmmmYYY() - convert mm/dd/YYYY to dd-MMM-YYYY (just use QNial!?!) # +-----+ # [str, pinn]_[rm, get, ?sed?]Between stuff - # str_chrP_rmBetween(str chrP) - rm chrs between chr[start, end] = chrP, chrP example '{}' # handy when sed is greedy and can't get result without recursion # povr_chrP_rmBetween(povr chrP) - with povr, rm chrs between chr[start, end] = chrP # example 'povr_chrP_rmBetween povr {}' # handy when sed is greedy and can't get results without facy back-&-forth recursion # this func does NOT recurse, intentionally, won't work across lines (maybe xargs?) # str_get_links(str sedStrt) - test multiple sedStr per line in [geany, html] (paragraph)