#!/bin/zsh d=${0:a:h:h} ascii-image-converter -h if [ $? -eq 1 ];then echo https://github.com/TheZoraiz/ascii-image-converter echo install ascii-image-converter exit fi t=`ls $d/icon` n=`echo $t|wc -l` for ((i=1;i<=$n;i++)) do tt=`echo $t|awk "NR==$i"` name=${tt%%.*} echo $i echo $tt ascii-image-converter $d/icon/$tt -C -W 80 -b --threshold 120 >! $d/ascii/${name}_color.txt ascii-image-converter $d/icon/$tt -W 80 -b --threshold 120 >! $d/ascii/${name}.txt echo --- done