Last active
April 19, 2018 18:53
-
-
Save jessebutryn/37c6d0e5a8ffb49a26fcea09e4613308 to your computer and use it in GitHub Desktop.
Hello world script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| declare -a alph | |
| declare -a prnt | |
| for l in {a..z}; do | |
| alph+=( "$l" ) | |
| done | |
| while read -r i; do | |
| if ((i==7)); then | |
| prnt+=( "$(awk '{print toupper($0)}' <<<"${alph[i]}")" ) | |
| else | |
| prnt+=( "${alph[i]}" ) | |
| fi | |
| done << EOF | |
| 7 | |
| 4 | |
| 11 | |
| 11 | |
| 14 | |
| EOF | |
| prnt+=( '<' ) | |
| for i in 22 14 17 11 3; do | |
| case $i in | |
| 22) | |
| prnt+=( "$(tr '[:lower:]' '[:upper:]' <<<"${alph[i]}")" ) | |
| ;; | |
| *) | |
| prnt+=( "${alph[i]}" ) | |
| ;; | |
| esac | |
| done | |
| tr -d ' ' <<< "${prnt[@]}" | sed 's/</, /' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment