Created
January 22, 2025 11:11
-
-
Save mschmitt/2a5c508e99e3f51c4de99dabe7d75b2f to your computer and use it in GitHub Desktop.
Remove the date field from a redirected ls -l output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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