Path: utzoo!mnetor!uunet!husc6!im4u!ut-sally!ut-emx!juniper!painter From: painter@juniper.UUCP (Tom Painter ) Newsgroups: comp.unix.questions Subject: Math functions in shell script? Message-ID: <2653@juniper.UUCP> Date: 6 Apr 88 23:45:00 GMT Reply-To: painter@juniper.UUCP (Tom Painter ) Distribution: na Organization: Austin UNIX Users' Group, Austin, TX Lines: 27 I am having problems finding out how to do calculations in a shell script. I am assuming there are methods because of the ability to check variables using -lt, -gt, ... (<,>,etc). Granted this does not necessarily mean that they do exist. I would like to go through a loop 4 times, The code roughly is : if test "$cnt" -lt 5 do msg$cnt= 'Message 1';; #somehow increment cnt and go through loop again cnt=cnt + 1 # ^^^^^^^^^^^ wrong language but message should be clear done (etc......) Thanks in advance Tom -- Tom Painter ut-emx!mybest!painter or uunet!bigtex!mybest!painter