Saving terminal scrollback to evernote
I tend to keep a log of things I did when operating on production systems. It took quite a few steps to get this done, so I automated my workflow with a bash script.
This script will put the current scrollback buffer into a temp file and import that file into evernote. I am aware I can paste the buffer directly into the note but I prefer the way evernote reacts when you type the save command, it will prompt you for a title.
Enjoy.
#!/bin/sh # # Author: arijan.luiken at snow.nl # osascript << @EOF set fp to "/tmp/terminal.txt" tell application "Terminal" activate set buffer to history of front window as text end tell try open for access fp with write permission set eof of fp to 0 write (buffer) to fp starting at eof close access fp on error try close access fp end try end try tell application "Evernote" activate create note from file fp tags "#terminal" end tell @EOF
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
3 Comments
Jump to comment form | comments rss [?] | trackback uri [?]