question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I am trying to increment a filename in a script example name is 000001.txt
and I need to keep the leading 0's. I have no problem if the name was 1.txt, 2.txt etc...
var=`expr $var + 1`

however how do I keep the leading 0's?

Thanks,

Jerry
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux