Question Locked

Shell Script

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
give me the source code in shell script to find the bigeest and smallest number from the given series

3 replies

by dr dij

it is customary in english to ask nicely rather than 'give me' which implies a demand.

are you talking about unix shell script?

It is also customary to explain what you are looking for.

However if we gave you the answer, you'd never learn for your class's assignment. Suggest you read a book on shell scripting instead.

by bizzo

An algorithm for finding the biggest and smallest element in an array can be taken from a variation of the bubble sort algorithm. Bubble sort swaps elements to reorder the array. You can amend it to just find the biggest or smallest.
http://en.wikipedia.org/wiki/Bubble_sort

And for shell scripting look here:
http://en.wikipedia.org/wiki/Shell_script

And if you want a link to source code:
http://en.wikipedia.org/wiki/Source_code

I'm in such a wiki day today!

I hope this helps, and I hope you do realy well in your coursework, seriously!

This discussion is closed to new replies.