Extract all urls from the last firefox sessionstore.js file used.
- Tags: Browsers, Clients, Extensions, Firefox, grep, perl, Uniform Resource Locator, WWW
| Hot: |
- Image via
Some taken from commandlinefu. What all the below commands are doing is basically that the url: is captured from the sessionstore.js file and then just extract the URL from the line. These are done in various ways using perl, and :
List last opened tabs in firefox browser
F=”$HOME/.moz*/fire*/*/session*.js” ; -Go ‘entries:[[^]]*’ $F | cut -d[ -f2 | while read A ; do echo $A | sed s/url:/n/g | tail -1 | cut -d" -f2; done
extract all urls from firefox sessionstore
sed -e "s/[{/n/g" -e "s/}, {/n/g" sessionstore.js | grep url | awk -F"," '{ print $1 }'| sed -e "s/url:"([^"]*)”/1/g” -e “/^about:blank/d”
Extract all urls from the last firefox sessionstore.js file used.
grep -oP ‘”url”:”K[^"]+’ $(ls -t ~/.mozilla/firefox/*/sessionstore.js | sed q)
Extract all urls from last firefox sessionstore used in a portable way.
perl -lne ‘print for /url”:”K[^"]+/g’ $(ls -t ~/.mozilla/firefox/*/sessionstore.js | sed q)
Extract all urls from the last firefox sessionstore.js file used.
sed -e ‘s/{“url”:/n&/g’ ~/.mozilla/firefox/*/sessionstore.js | cut -d” -f4
Related articles by Zemanta
- (hacks.mozilla.org)
- (techcrunch.com)
- (lifehacker.com)
related post
<< vim scripts and tips monkeystudio IDE on Fedora 12.. IDE of choice >>
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
No comments yet, be the first!








Facebook
Digg
Delicious
Flickr
FriendFeed
LinkedIn
MyBlogLog
Orkut
Reddit
StumbleUpon
Technorati
Twitter
Youtube






