diff --git a/dots/bash/.bashrc b/dots/bash/.bashrc index 0aa3547..3fcc1cc 100644 --- a/dots/bash/.bashrc +++ b/dots/bash/.bashrc @@ -465,14 +465,32 @@ rotl() { size=$((size - 25)) fi - # https://stackoverflow.com/questions/20871534/concatenate-in-bash-the-output-of-two-commands-without-newline-character - { echo "rot +$size: "; rot $size $1; } | tr "\n" " " - echo - { echo "rot -$size: "; rot -$size $1; } | tr "\n" " " - echo + # if there is a second argument, only the rotation will be printed + if [[ -n $2 ]] ; then + rot $size $1 + else + # https://stackoverflow.com/questions/20871534/concatenate-in-bash-the-output-of-two-commands-without-newline-character + { echo "rot +$size: "; rot $size $1; } | tr "\n" " " + echo + { echo "rot -$size: "; rot -$size $1; } | tr "\n" " " + echo + fi + fi } +rotm() { + if [[ -n $1 ]] ; then + + datestamp=$(date +%y%m%d)_ + rotl=$(rotl $1 0) + # ${param/pattern/replacement} + rotl="${rotl/./}" + emailaddress=$datestamp$rotl"@468910.xyz" + echo $emailaddress + + fi +} # --- # mounting