shell script to convert numbers to asterisk -
i have variable holds number, using shell script how can convert number asterisk characters, example 5 converted *****
, 2 converted **
on simple solution use perl:
var=5 perl -e "print '*' x $var"
other solution use seq
:
var=5 in `seq $var` ; echo -n '*' ; done
Comments
Post a Comment