Leading Zeros and reverse sort
Posted: Wed Dec 19, 2012 10:11 am
I need to add a six digit sequence number to a line of text. The sequence number needs leading zeros. This is so it can be sorted in reverse order after the file has the correct sequence number.
This is what I have now:
text 1
text 2
text 3
text 4
What I need is:
text 000001
text 000002
text 000003
text 000004
So it can then be sorted like this:
text 000004
text 000003
text 000002
text 000001
Any help would be appreciated.
This is what I have now:
text 1
text 2
text 3
text 4
What I need is:
text 000001
text 000002
text 000003
text 000004
So it can then be sorted like this:
text 000004
text 000003
text 000002
text 000001
Any help would be appreciated.