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

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -