Can anyone replicate this for me on AIX 5.2
function convert_time_to_seconds {
echo $1|tr ':' ' '|read hrs min sec
echo $((($hrs*60*60)+($min*60)+$sec))
}
convert_time_to_seconds 14:00:07
works fine
convert_time_to_seconds 14:00:09
convert_time_to_seconds[2]: 09: 0403-009 The specified number is not valid for this command.
This script worked fine on 4.3.3, anyone got any idea?
--
| Mike Nixon
| Unix Admin
|
----------------------------
function convert_time_to_seconds {
echo $1|tr ':' ' '|read hrs min sec
echo $((($hrs*60*60)+($min*60)+$sec))
}
convert_time_to_seconds 14:00:07
works fine
convert_time_to_seconds 14:00:09
convert_time_to_seconds[2]: 09: 0403-009 The specified number is not valid for this command.
This script worked fine on 4.3.3, anyone got any idea?
--
| Mike Nixon
| Unix Admin
|
----------------------------