Skip to content

Instantly share code, notes, and snippets.

@mschmitt
Created January 22, 2025 11:11
Show Gist options
  • Save mschmitt/2a5c508e99e3f51c4de99dabe7d75b2f to your computer and use it in GitHub Desktop.
Save mschmitt/2a5c508e99e3f51c4de99dabe7d75b2f to your computer and use it in GitHub Desktop.
Remove the date field from a redirected ls -l output
#!/usr/bin/env python3
import sys,re
date=re.compile(r" (\S|\D){3} ( \d|\d\d) (\d\d:\d\d| \d{4}) ")
for l in sys.stdin:
l = date.sub(' xxxxxxxxxxxx ', l.rstrip())
print(l)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment