Skip to content

Instantly share code, notes, and snippets.

@emasaka
Created April 1, 2013 10:44
Show Gist options
  • Save emasaka/5284238 to your computer and use it in GitHub Desktop.
Save emasaka/5284238 to your computer and use it in GitHub Desktop.
draw circle by shell script
#!/bin/bash
R=36
RATIO=2
for ((y = -R; y <= R; y += RATIO)); do
x=$(dc -e "$R 2^${y/-/_} 2^-vp")
printf '%*s%*s%*s\n' $((R - x)) x $x '' $x x
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment