I have a requirement to create a specific text as
harley01
harley02
harley03
harley04
harley05
harley06
harley07
harley08
harley09
harley10
Here one can observe that just the numbers are increasing, yes we can create specific text appended bye each line using SEQ command.
~]# seq -f "harley%02g" 10
harley01
harley02
harley03
harley04
harley05
harley06
harley07
harley08
harley09
harley10
Change harley with your own word
Change 10 with your required number.
Now if you don't need to add 0 before your number like 01,02,03 then use the below mentioned command.
]# seq -f "harley%01g" 10
harley1
harley2
harley3
harley4
harley5
harley6
harley7
harley8
harley9
harley10
harley02
harley03
harley04
harley05
harley06
harley07
harley08
harley09
harley10
Change harley with your own word
Change 10 with your required number.
Now if you don't need to add 0 before your number like 01,02,03 then use the below mentioned command.
]# seq -f "harley%01g" 10
harley1
harley2
harley3
harley4
harley5
harley6
harley7
harley8
harley9
harley10
No comments:
Post a Comment