How can I reproduce the Finder sort order without asking Finder to sort for me?
The exact sorting order used by Finder probably depends on the locale, but scripting languages like Ruby and Python have libraries for sorting strings naturally.

#!/usr/bin/env ruby -rubygems -KU

require 'natural_sort' # gem install naturalsort

input = "name-II-1
name-6
name-2
name-19".lines
# input = Dir["#{ENV['HOME']}/Documents/*"]

puts NaturalSort.naturalsort(input)