mauvehed's dotfiles for personal and work environments
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

bin: set randkey executable

mauvehed 425a73ad e2b5fd50

+16 -16
+16
dot_local/bin/executable_randkey
··· 1 + #!/bin/bash 2 + 3 + # Default value if no argument is provided 4 + LENGTH=48 5 + 6 + # If the user provides one numeric argument, use it instead 7 + if [[ $# -eq 1 && $1 =~ ^[0-9]+$ ]]; then 8 + LENGTH=$1 9 + elif [[ $# -gt 1 ]]; then 10 + echo "Usage: $0 [length]" 11 + exit 1 12 + fi 13 + 14 + # Run the command 15 + openssl rand -hex "$LENGTH" 16 +
-16
dot_local/bin/randkey
··· 1 - #!/bin/bash 2 - 3 - # Default value if no argument is provided 4 - LENGTH=48 5 - 6 - # If the user provides one numeric argument, use it instead 7 - if [[ $# -eq 1 && $1 =~ ^[0-9]+$ ]]; then 8 - LENGTH=$1 9 - elif [[ $# -gt 1 ]]; then 10 - echo "Usage: $0 [length]" 11 - exit 1 12 - fi 13 - 14 - # Run the command 15 - openssl rand -hex "$LENGTH" 16 -