vodkadrinker
Technical User
Example
>echo 08 + 01|bc -l
9
and I am after 09 is there an easy way to do this please.
>echo 08 + 01|bc -l
9
and I am after 09 is there an easy way to do this please.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
typeset -Z2 var
var=$(echo 08 + 01|bc -l)
echo $var
09
typeset [+HLRZfilrtux [n]] [Name[= Value]] ... Sets attributes and values for shell parameters. When invoked inside a function, a new instance of the Name parameter is created. The parameter value and type are restored when the function completes. You can specify the following flags with the typeset command:
-Z
Right-justifies and fills with leading zeros if the first nonblank character is a digit and the -L flag has not been set. If the n parameter has a nonzero value, it defines the width of the field; otherwise, it is determined by the width of the value of its first assignment.