# UNIX or Linux code

**URL:** <https://forums.speedlife.net/t/unix-or-linux-code/41951>\
**Category:** NYSpeed Off Topic\
**Created:** [January 16, 2008, 3:45pm UTC](https://forums.speedlife.net/t/unix-or-linux-code/41951 "2008-01-16T15:45:31Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)\
**Post date:** [January 16, 2008, 9:32pm UTC](https://forums.speedlife.net/t/unix-or-linux-code/41951/20 "2008-01-16T21:32:37Z")

</div>

heres the code for the first problem in case anyone wanted to see how its done

```auto
#!/bin/ksh

current_high=$1
current_low=$1
sum=0
for arg;do
sum=$(($sum+$arg))
if [$current_high -lt $arg] ; then
   current_high=$arg
fi

if [$arg -lt $current_low] ; then
   current_low=$arg
fi

done
avrg=$(($sum/$#))
print "Highest Number: "$current_high
print "Lowest Number: "$current_low
print "Sum of the numbers: "$sum
print "Average of the numbers: "$avrg

```

---

_[View the full topic](https://forums.speedlife.net/t/unix-or-linux-code/41951)._
