From 29c898ebeb6db89729bfd6e26ded65683d119eba Mon Sep 17 00:00:00 2001 From: fro Date: Wed, 27 Aug 2025 19:58:08 -0500 Subject: [PATCH] /+ rote() rotate (domain and get signup) email address --- dots/bash/.bashrc | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) 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