Browse Source

add func randomstr

pull/1/head
10sr 11 years ago
parent
commit
d32ebd109b
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      bashrc

+ 6
- 0
bashrc View File

@@ -364,6 +364,12 @@ null type gitmemo && alias m=gitmemo

alias setup.py="sudo python3 setup.py install --record files.txt"

randomstr(){
len=$1
test -z "$len" && len=8
uuidgen | tr -d - | cut -c 1-$len
}

datestr(){
# datestr yyyyMMdd-hhmmss
if test -z "$1" || test "$1" == "-h"


Loading…
Cancel
Save