Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!denali!karish From: karish@denali.UUCP (karish) Newsgroups: comp.unix.questions Subject: Re: Math functions in shell script? Message-ID: <40@denali.UUCP> Date: 8 Apr 88 04:06:48 GMT References: <2653@juniper.UUCP> Reply-To: karish@denali.UUCP (Chuck Karish) Distribution: na Organization: Mindcraft, Inc. Lines: 14 In article <2653@juniper.UUCP> painter@juniper.UUCP (Tom Painter ) writes: > >I am having problems finding out how to do calculations in a shell script. >I would like to go through a loop 4 times, >The code roughly is : >if test "$cnt" -lt 5 > do > msg$cnt= 'Message 1';; > cnt=cnt + 1 ># ^^^^^^^^^^^ wrong language but message should be clear > > done (etc......) > cnt=`expr $cnt + 1`