sort shell?

hello my problem is that I have to do diferents sorts shells with diferents logical algorithms
like shell sort, select sort, quick sort and bubble sort.
starting from a basic shell that says something like:

file = cat $1
sortLogic = $2
colSort = $3
source sortLogic file colSort > $4

this basic shell receives the file that I want to order, sort shell, the column being sorted, and the file where the sorted file was printed.

I get (understand) the sorts algorithms logic
the problem is I dont know how to do the sort shells
receiving a file as a parameter and the column to sort

I thought of the solution by awk but I dont know how to build the script
I need whiles or fors to read from column 1 to column n
where n is a decreasing variable and does the same with rows

And also make comparisons of data in columns
and that it would replace. but again I dont know how to do this.

I did try to get as example the /bin/sort, but It encrypted (on my pc)...
I realy appreciate your help ar recommendations.

We have a homework forum - and this post is clearly homework. Please repost there.

Thank you.