Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Porting scripts from IRIX64 to SUNOS

Status
Not open for further replies.

pdmd

Technical User
Dec 30, 2002
1
GB
Why won't the following script run on a Sun operating system when it will on an IRIX64?

#! /usr/bin/sh

integer count=1
while (( count <= 9 ))
do
print &quot;count is : $count&quot;
(( count +=1 ))
done

 
use /usr/bin/ksh instead. hope this helps.
 
Here is an example that will do exactly what you want in sh on a solaris box:

#!/usr/bin/sh

c=&quot;1&quot;
while [ $c -lt &quot;9&quot; ]
do
echo &quot;count is : $c&quot;
c=`expr $c + 1`
done
exit

I hope this helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top