Skip to content

Instantly share code, notes, and snippets.

@132ikl
Last active May 4, 2020 05:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 132ikl/c3f0b3c900693e26ac358184d714260a to your computer and use it in GitHub Desktop.
Save 132ikl/c3f0b3c900693e26ac358184d714260a to your computer and use it in GitHub Desktop.
aestetic text generator
#!/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