Created
May 21, 2022 04:56
-
-
Save mothdotmonster/211c372dba429963a86d26d15514e460 to your computer and use it in GitHub Desktop.
bold half of every word in the input
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 | |
while [ "$1" != "" ]; do | |
printf "\033[1m%s\033[m%s " "${1:0:$(( ${#1} / 2 ))}" "${1:$(( ${#1} / 2 ))}" | |
shift 1 | |
done | |
printf "\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment