Skip to content

Instantly share code, notes, and snippets.

@burdandrei
Last active August 29, 2015 14:22
Show Gist options
  • Save burdandrei/6096313c1cf1dbf61ddf to your computer and use it in GitHub Desktop.
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!
#!/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