|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Time delay
from script i have got 2 time variable
$a=4.30 $b=4.00 how to calculate the diff b/w these two time.... i want $a - $b=? Could any1,help me in this...............Below the script ----------------------------------------------- #!/bin/ksh a=`date +"%H:%M"` cd /ednadtu3/u01/pipe/logs Time=`ls -ltr Archiver1* | tr -s " " | cut -d " " -f8` echo expr $a - $Time |
|
#2
|
|||
|
|||
|
I dont know that the shell has support for floating point operations.
Try: Code:
a=4.30 b=4.0 c=`echo "scale=6; $a - $b" | bc -l`
__________________
-- I'll provide you with reference points; if they dont work, refer to something else. If you process text, this might make your life a little easier. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Time delay |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|