diff --git a/sheets/printf b/sheets/printf index 1563c4c..2a093ad 100644 --- a/sheets/printf +++ b/sheets/printf @@ -26,3 +26,7 @@ printf '%#.3d\n' 12 # As above, but instead, space-pad the number. Prefix the `3` with a hyphen # (`-`) to left-align the number, causing the padding to occur on the right. printf '%3d\n' 12 + +# Set a field's spacing by using an integer provided as a variable. This is +# incredibly useful when you're dealing with inconsistent field lengths. +printf '%*s\n' $Integer 'Example Field'