Created
December 14, 2015 22:28
-
-
Save bheru27/762f0d58af08f5108cb6 to your computer and use it in GitHub Desktop.
.bash_history to .zsh_history converter
This file contains hidden or 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 python2 | |
#usage: cat .bash_history | ./bash2zsh.py >> .zsh_history | |
import sys | |
import time | |
for line in sys.stdin: | |
line = line.rstrip('\n') | |
timestamp = int(time.time()) | |
sys.stdout.write(': %s:0;%s\n' %(timestamp, line)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment