#!/usr/bin/env runawk

#use "quicksort.awk"

# This demo sorts the input lines as strings and outputs them to stdout

# Input files for this demo: examples/demo_quicksort.in

{
	array [++count] = $0
}

END {
	quicksort(array, remap, 1, count)

	for (i=1; i <= count; ++i){
		print array [remap [i]]
	}
}
