greycat 1158260065 learn ... greycat 1158260116 forget BlastHardcheese 1361438280 learn sortfiles declare -a files; n=0; while read -r -d ''; do for((i=0;i<=n;i++)); do if [[ "$REPLY" -nt "${files[i]}" ]]; then for((j=n;j>i;j--)); do files[j]="${files[j-1]}"; done; files[i]="$REPLY"; ((n++)); break; fi; done; done < <(find . -type f -print0) # sorts all files under . by mtime; requires a find(1) that supports -print0 BlastHardcheese 1361438603 forget