answersLogoWhite

0

You really don't want to do this in a shell script - scripting languages in Unix typically do not handle or work with floating values, only integers. A better way would be to write a program to do this that works under Unix, such as a 'C" program.

See the related link for an example

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao
MaxineMaxine
I respect you enough to keep it real.
Chat with Maxine

Add your answer:

Earn +20 pts
Q: Unix script to calculate average of n numbers given by user?
Write your answer...
Submit
Still have questions?
magnify glass
imp