Extract all urls from the last firefox sessionstore.js file used.No Gravatar
Hot:sun Extract all urls from the last firefox sessionstore.js file used.sun Extract all urls from the last firefox sessionstore.js file used.sun Extract all urls from the last firefox sessionstore.js file used.sun dark Extract all urls from the last firefox sessionstore.js file used.sun dark Extract all urls from the last firefox sessionstore.js file used.

Effective Perl Programming
Image via Wikipedia

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, sed and awk:

List last opened tabs in firefox browser

F=”$HOME/.moz*/fire*/*/session*.js” ; grep -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

 Extract all urls from the last firefox sessionstore.js file used.

Reblog this post [with Zemanta]


related post

Share This Post

Technorati Tags: Browsers, Clients, Extensions, Firefox, grep, perl, Uniform Resource Locator, WWW

Blog Traffic Exchange Related Posts Blog Traffic Exchange Related Websites