Skip to content

Instantly share code, notes, and snippets.

@rectalogic
Created September 1, 2017 15:23
Show Gist options
  • Save rectalogic/9611bb9cb67eefc3158b4ea2d0a43c07 to your computer and use it in GitHub Desktop.
Save rectalogic/9611bb9cb67eefc3158b4ea2d0a43c07 to your computer and use it in GitHub Desktop.
#!/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