Portál AbcLinuxu, 10. května 2025 08:51
cat vstup | while read line; do date "+%F %T $line"; done
#!/usr/bin/env python import sys, time while True: line = sys.stdin.readline() if not line: break now = time.localtime() stamp = time.strftime("%F %T ", now) sys.stdout.write(stamp+line)
perl -mPOSIX=strftime -pe '$_ = strftime("%F %T ", localtime).$_'
sed "s/^/$(date "+%F %T") /"
date
spustí jednou a pak už používá pořád to stejný... tak nic
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.