Last active
May 4, 2020 05:25
-
-
Save 132ikl/c3f0b3c900693e26ac358184d714260a to your computer and use it in GitHub Desktop.
aestetic text generator
This file contains 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 | |
IFS='\n' | |
INPUT=$(cat) | |
for line in $INPUT; do | |
for ((i = 0; i < ${#line}; i++)); do | |
echo -n "${line:$i:1}" | |
if [[ "$i" != "${#line}" ]]; then # don't insert extra space at EOL | |
echo -n " " | |
fi | |
done | |
done | |
echo # extra newline at end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment