I'm having problem with an bit of school work.
I'm meant to be getting a text file, sorting it into descending number order and then loading it into an array. All within a shell script. This is the very first time I've used AWK and although I have read all the literature provided it doesn't seem to cover how to get started.
So far all I have is:
But obviously that doesn't work.Code:#!/bin/awk -f myarray=data.txt
Would be great if someone could point me in the right direction, how to define an array from a text file within a shell script using awk.
Thanks in advance.