shell脚本画心

#!/bin/bash
y=1250
for (( yy = 45; yy > 0; yy-- )); do
x=-1140
	for (( xx = -120; xx < 0; xx++ )); do
		ff=$(echo `awk -v x=${
      x} -v y=${
      y} 'BEGIN{
      printf "%.0f\n",(((x/1000)*(x/1000)+(y/1000)*(y/1000)-1)*((x/1000)*(x/1000)+(y/1000)*(y/1000)-1)*((x/1000)*(x/1000)+(y/1000)*(y/1000)-1)-(x/1000)*(x/1000)*(y/1000)*(y/1000)*(y/1000))*10000000}'`)
		if [[ ff -le 0 ]]; then
			printf "\e[1;41m \e[0m"
		else
		    printf " "
		fi
	x=$((${x}+20))
	done
printf "\n"
y=$((${y}-50))
done

你可能感兴趣的:(shell脚本)