File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,21 @@ function fix_validate_jsonl()
277277 fi
278278}
279279export -f fix_validate_jsonl
280+ function gen_random_string()
281+ {
282+ local R_LIMIT=" ${1:- 32} "
283+ local X=" X"
284+ local T_IN_T=$( printf ' %s' " ${X} $( printf ' %.0sX' $( seq 1 " ${R_LIMIT} " ) ) " )
285+ local T_IN=" $( echo " ${T_IN_T} " | head -c 251 | tr -d ' [:space:]' ) "
286+ local T_OUT=$( mktemp -u " ${T_IN} XXXX" )
287+ echo " ${T_OUT} " | tr -d " [:space:]" | head -c " ${R_LIMIT} "
288+ }
289+ export -f gen_random_string
290+ function gen_random_string_date()
291+ {
292+ echo " $( gen_random_string ${1:- 2} ) -$( date --utc +' %Y-%m-%dT%H-%M-%SZ%2N_%p_UTC' ) " | tr -d ' [:space:]'
293+ }
294+ export -f gen_random_string_date
280295function init_fzf()
281296{
282297 if [[ " $( command -v bat) " && " $( command -v fd) " && " $( command -v fzf) " && " $( command -v tree) " ]]; then
You can’t perform that action at this time.
0 commit comments