Txt

Byte sized tech know-how.

  • Home
  • About

Tag Archives: pad

02 Jul

Zero Padding In Linux Commands

This is how you zero pad a numerical variable in bash.


for ((x=1;x<=31;x+=1)); do echo `printf "%02d" $x`; done

Original Article

admin Posted in Code, Command Line, Linux command, for, Linux, number, pad, padding, printf, zero Leave a comment

Post navigation

Categories

  • Code
  • Command Line
  • Configuration
  • CSS
  • HTML
  • internet
  • JavaScript
  • Linux
  • Mobile
  • Perl
  • PHP
  • Python
  • Ruby
  • Uncategorized

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Fruitful theme by fruitfulcode Powered by: WordPress
↑