In this post, Perderabo's script says
echo 05/06/25 14:15:56 | IFS=" /:" read Y1 M1 D1 h1 m1 s1
which, if I am not wrong, will break the input into Y1, M1 et al.
I tried the following in my code
#! /bin/ksh
# per.sh
typeset -R2 HOUR=00
typeset -R2 MIN=00
typeset -R2 SEC=00
TIME=09:12:23
echo $TIME | IFS=" :" read HOUR MIN SEC
echo $HOUR$MIN$SEC
echo $TIME
And it gave me this.
[~/temp]$ ksh per.sh
000000
09:12:23
[~/temp]$ uname -a
Linux staci21 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 i686 i386 GNU/Linux
Any idea what is wrong in my code ? Am I missing something ?
Thanks,
Vino