Created
March 3, 2011 02:14
-
-
Save yoshikaw/852192 to your computer and use it in GitHub Desktop.
zsh履歴ファイルのUNIX時間を人に優しい形にするperlワンライナー
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
cat ~/.zsh_history | perl -pe 's/: (\d+):/@a=(localtime($1));sprintf("[%04d\/%02d\/%02d %02d:%02d] ",$a[5]+1900,$a[4]+1,@a[3,2])/eg;' | |
<<出力例>> | |
[2010/12/28 13:00] 0;ls -altr | |
[2010/12/28 13:00] 0;svn update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment