snipt

Ctrl+h for KB shortcuts

Bash

bash integer padding

printf "%03d\n" 12
https://snipt.net/embed/04bc98ec58e2bda85e1a50b34079b762/
/raw/04bc98ec58e2bda85e1a50b34079b762/
04bc98ec58e2bda85e1a50b34079b762
bash
Bash
1
2019-05-27T05:31:13
True
False
False
/api/public/snipt/5690/
bash-integer-padding
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nb">printf</span> <span class="s2">&quot;%03d\n&quot;</span> 12 </span></pre></div> </td></tr></table>
bash, printf