Skip to content

Instantly share code, notes, and snippets.

@rdermer
rdermer / gist:2b04239fdb05e27b9c322e8a75d15817
Created January 15, 2025 20:30
Latest filename from directory or list of files - whitespace safe
#!/usr/bin/env python3
import sys
import os
# prints name of newest file - ignores directories
# 3 cases
# list of files
# a single argument that is a directory