source: SH_SHM/branches/2011.2/source/img/time2fknum.csh @ 364

Revision 16, 413 bytes checked in by marcus, 14 years ago (diff)

r1 | svn | 2007-12-13 11:10:29 +0100 (Do, 13 Dez 2007) | 2 lines

Initial import

  • Property svn:executable set to *
Line 
1#! /bin/csh
2#
3# file time2fknum.csh
4#      ==============
5#
6# version 1, 8-Oct-2001
7#
8# Compute time slice number
9# K. Stammler, 8-Oct-2001
10
11if  ("$1" == "")  then
12        echo "Usage: $0 <time>"
13        exit
14endif
15
16set timestr=`echo $1 | sed 's/:/ /'`
17if  ($#timestr != 2)  then
18        echo "Illegal parameter $1.  Abort."
19        exit
20endif
21
22set hour=$timestr[1]
23set min=$timestr[2]
24
25@ num = (($hour * 3600) + ($min * 60)) / 5
26
27echo $num
Note: See TracBrowser for help on using the repository browser.