Created
September 1, 2017 15:23
-
-
Save rectalogic/9611bb9cb67eefc3158b4ea2d0a43c07 to your computer and use it in GitHub Desktop.
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 python | |
# | |
# $ cat ~/.bash_history | bash-history-to-zsh-history.py >> ~/.zsh_history | |
import sys | |
import time | |
def main(): | |
timestamp = int(time.time()) | |
for line in sys.stdin.readlines(): | |
line = line.rstrip('\n') | |
sys.stdout.write(': %s:0;%s\n' % (timestamp, line)) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment