Created
March 10, 2012 18:14
-
-
Save emilssolmanis/2012351 to your computer and use it in GitHub Desktop.
Open tabs opened on a remote host locally in Opera
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
# The temp file is needed to avoid infinite loop cases, Opera writes to the | |
# autosave file when it opens a new tab. While technically this shouldn't | |
# happen if you open from a remote host, better safe than sorry. | |
function open_tabs_from { | |
ssh $1 "fgrep -A2 \"history url\" ~/.opera/sessions/autosave.win | grep 0= | cut -d \"=\" -f 2-" > /tmp/opera.tabs | |
cat /tmp/opera.tabs | xargs -I{} opera -newtab {} | |
rm /tmp/opera.tabs | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment