awk sort function not sorting from lowest to highest.
I am trying to use the awk sort function to sort numbers from a column of numbers from lowest to highest.
Here is an example of what the numbers from the column look like:
1
2
3
10
4
12
I am using the following to sort the numbers:
awk '(print $1}' file | sort
The output is:
1
10
12
2
3
4
Clearly this is not the order of the numbers from lowest to highest. Can anyone give me advice on what has to added for the numbers to be sorted correctly.
|