Mailinglist Archive: opensuse (1470 mails)

< Previous Next >
Re: [opensuse] What is the meaning of these firewall log entries?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 2016-02-14 01:33, Bernhard Voelker wrote:
On 02/13/2016 07:50 PM, Carlos E. R. wrote:
I need to code something first. I need a pipe that receives text
entries, and writes them to stdout prefixed with a timestamp.

http://stackoverflow.com/q/21564/4421

So, it is an often asked question.

I'd personally probably prefer an awk solution:

To each its own - I don't know awk, but I do pascal ;-)


$ { echo hello ; sleep 3 ; echo world; } \ | stdbuf -oL awk '{
print strftime("%Y-%m-%d %H:%M:%S"), $0 }' 2016-02-14 01:29:35
hello 2016-02-14 01:29:38 world

Have a nice day, Berny



- --
Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 "Bottle" (Minas Tirith))
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iF4EAREIAAYFAla/2KsACgkQja8UbcUWM1w/ugD/ZvgJqumtj/k/KfInygWTSNHn
xtCPv9TFoE3BXSspYV8A/A3K+rG97fZOLIV03xkckbRJeJ6UuMEu5FAqpUQrmSFi
=7lkj
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >