Wednesday, August 24, 2011

open list of urls in a bunch of tabs on chrome on os x

I put the urls in a cr-delimited list in a textfile, "url-list.txt".

Initialize a fakey user data dir for Chrome to use:
$ /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/
(Chrome will pop up... pick a search engine and all that nonsense, then hit ctrl+c when done)

Open all the urls in a bunch of tabs:
$ cat url-list.txt | xargs /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/

If you don't specify a user data dir, and you have Chrome open (of course you do) you'll get an "Unable to obtain profile lock" error message. Also, you may want to keep this list of urls separate from your user profile.

If you don't want to keep the urls separate from your user profile, exit Chrome first, and just use:
$ cat url-list.txt | xargs /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.