LoginSignup
2
2

More than 5 years have passed since last update.

Perlで標準入力の行頭に時間を付与するワンライナー

Posted at

後々の煩悶時間節約のためのメモです。

perl -M'POSIX' -nle 's/\s+$//; print strftime("%Y/%m/%d %H:%M:%S ", localtime()) . $_'

TOPをログして解析したい場合。

top -n 1 -b | perl -M'POSIX' -nle 's/\s+$//; print strftime("%Y/%m/%d %H:%M:%S ", localtime()) . $_'
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2