georges tso wrote:
>
> J'ai un petit programme shell qui est lanc� avec deux
> arguments $1 et $2 qui sont num�riques sur trois
> positions.
> Est ce quelqu'un pourrait me dire comment faire pour
> formater ces deux arguments avant ex�cution ?
>
> exemple : toto.sh 25 8 --> toto.sh 025 008
J'ai deja eu besoin de faire un truc similaire. Pour cela, j'ai utilise
printf.
ex :
k=2
kk=`printf "%2.2d" $k`
Ca revoit k=02 ...
Si ca peut te depanner ...
MANU
>
> Merci d'avance.
>
> __________________________________________________
> Do You Yahoo!?
> Get Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/
--