<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>theconsultant.net &#187; Links</title>
	<atom:link href="http://www.theconsultant.net/category/links/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theconsultant.net</link>
	<description>Simplicity is complicated.</description>
	<lastBuildDate>Thu, 17 Sep 2009 17:00:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Open a pile of links in browser tabs, all at once!</title>
		<link>http://www.theconsultant.net/2008/05/open-a-pile-of-links-in-browser-tabs-all-at-once/</link>
		<comments>http://www.theconsultant.net/2008/05/open-a-pile-of-links-in-browser-tabs-all-at-once/#comments</comments>
		<pubDate>Mon, 05 May 2008 18:47:55 +0000</pubDate>
		<dc:creator>dAVE</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://www.theconsultant.net/archives/2008/05/05/open-a-pile-of-links-in-browser-tabs-all-at-once/</guid>
		<description><![CDATA[One of things I occasionally do at work is to grab every url for a client&#8217;s domains/sites and open them up to eyeball them and see if anything obvious needs fixing.
First I go and copy a list of all the active domains, and clean it up with a &#8220;search and replace&#8221; script. I end up [...]]]></description>
			<content:encoded><![CDATA[<p>One of things I occasionally do at work is to grab every url for a client&#8217;s domains/sites and open them up to eyeball them and see if anything obvious needs fixing.
<p>First I go and copy a list of all the active domains, and clean it up with a &#8220;search and replace&#8221; script. I end up with a list of url&#8217;s, one per line.</p>
<p>After that I copy it all and go over to the Terminal and run a nice little script which I call &#8220;tab&#8221;. My current default browser then starts sprouting tabs galore.</p>
<p>Here&#8217;s the script:</p>
<p>
<code><br />
#!/bin/bash<br />
pbpaste | tr "\r" "\n" | xargs -n 1 open<br />
</code>
</p>
<p>
How does it work?</p>
<p>
<i>pbpaste</i> provides the contents of the clipboard to the command line (see pbcopy to put things into the clipboard). <i>tr</i> translates characters, in this case from one kind of line end (or return character) to another. An issue with pbcopy from what I can tell! Then the cleaned up clipboard gets pushed to <i>xargs</i> which take the command <code> -n 1 open </code> and builds one <i>open</i> per line of data being fed to it. Yes, <i>xargs</i> is very cool. The <i>open</i> command will then &#8220;open the URL in the default browser&#8221;.</p>
<p>
I am sure this can all be done in Applescript or Automator.. but typing tab and return on the command line is the fastest and simplest for me!
</p>
<p>
If you want to use the script and are not sure how to take the shell code above and turn it into an actual script.. let me know and i&#8217;ll provide instructions (gee, another blog post!).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theconsultant.net/2008/05/open-a-pile-of-links-in-browser-tabs-all-at-once/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
