Sponsored Content
Top Forums Shell Programming and Scripting How can get the value 001 using shell script Post 302335630 by palsevlohit_123 on Monday 20th of July 2009 06:04:05 AM
Old 07-20-2009
Instead of echo use the below...

Code:
printf "%03d" "$y"

 

2 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

for loop (001 to 500)

hey, how do i create a for loop that runs for i from 001 to 500 ? i need that the zero prefix will remain so when i print "i" it will look like so: 001 002 . . 008 009 . . 058 059 . . 500 please advise. (2 Replies)
Discussion started by: boaz733
2 Replies

2. Windows & DOS: Issues & Discussions

Simple 'date' to 001 scheme script

So since I'm looking for an easy way to numberize files in a folder according to date: Is there an easy script (batch, windows), that will rename files like this: .earliest creation time: 001.file older creatiin time : 002.file even older time : 003.file .... ... .. . ... (10 Replies)
Discussion started by: pasc
10 Replies
All times are GMT -4. The time now is 06:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy