Last active
August 29, 2015 14:22
-
-
Save burdandrei/6096313c1cf1dbf61ddf to your computer and use it in GitHub Desktop.
Do you love to to read scripts outputs as I do? Print these messages with stars around!
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
#!/usr/bin/env bash | |
# | |
# Just echo everything with Stars Around | |
starprint(){ | |
local INPUT=$* | |
local LENGTH=$(echo "$INPUT" | awk '{print length+4}') | |
line() { for i in $(eval echo "{1..$LENGTH}"); do echo -n '*'; done; echo; } | |
line | |
echo -n "* "; echo -n $INPUT;echo -n " *";echo | |
line | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment