Hi
I am looking for a way to shorten the following script, is there any other options?Thanks.
if [ $t_seq_number -le 9 ]
then
t_seq_number1="0000000000"$t_seq_number
else
if [ $t_seq_number -le 99 ]
then
t_seq_number1="000000000"$t_seq_number
else
if [ $t_seq_number -le 999 ]
then
t_seq_number1="00000000"$t_seq_number
else
if [ $t_seq_number -le 9999 ]
then
t_seq_number1="0000000"$t_seq_number
fi
fi
fi
fi
I am looking for a way to shorten the following script, is there any other options?Thanks.
if [ $t_seq_number -le 9 ]
then
t_seq_number1="0000000000"$t_seq_number
else
if [ $t_seq_number -le 99 ]
then
t_seq_number1="000000000"$t_seq_number
else
if [ $t_seq_number -le 999 ]
then
t_seq_number1="00000000"$t_seq_number
else
if [ $t_seq_number -le 9999 ]
then
t_seq_number1="0000000"$t_seq_number
fi
fi
fi
fi