#!/bin/bash

cat output* | sort -n | while read n ; do factor $n; done