Search Results

Search: Posts Made By: jason6247
3,878
Posted By MadeInGermany
Linux has seq seq -f %010.0f 0 9999999999You...
Linux has seq
seq -f %010.0f 0 9999999999You can pipe this into a while loop.
On Unix systems you can do it with awk
awk 'BEGIN {for (i=0;i<=9999999999;i++) printf "%010.0f\n",i}'
3,893
Posted By michaelrozar17
Through Sed.. sed 's/^/000/' inputfile
Through Sed..
sed 's/^/000/' inputfile
3,893
Posted By Yoda
Will this work for you? awk ' { print "000" $0;...
Will this work for you?
awk ' { print "000" $0; } ' number.txt
15,686
Posted By fpmurphy
No need to call external utilities such as seq. ...
No need to call external utilities such as seq. The following works for ksh93 and bash.

for i in {0..999}
do
printf "%03d\n" $i
done

or even simpler

printf "%03d\n" {0..999}
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 08:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy