<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Use wget(1) To Expand Shortened URLs</title>
	<atom:link href="http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/feed/" rel="self" type="application/rss+xml" />
	<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/</link>
	<description>Linux.  GNU.  Freedom.</description>
	<lastBuildDate>Fri, 17 May 2013 20:46:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6-beta2-24176</generator>
	<item>
		<title>By: Use wget(1) To Expand Shortened URLs</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-117186</link>
		<dc:creator>Use wget(1) To Expand Shortened URLs</dc:creator>
		<pubDate>Mon, 19 Nov 2012 18:47:42 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-117186</guid>
		<description><![CDATA[[...] via pthree.org [...]]]></description>
		<content:encoded><![CDATA[<p>[...] via pthree.org [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lauri Ranta</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-116779</link>
		<dc:creator>Lauri Ranta</dc:creator>
		<pubDate>Wed, 04 Jul 2012 09:36:18 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-116779</guid>
		<description><![CDATA[`curl -s -o /dev/null &#x2d;&#x2d;head -w &quot;%{url_effective}\n&quot; -L &quot;https://t.co/6e7LFNBv&quot;`

- `&#x2d;&#x2d;head` or `-I` only downloads HTTP headers
- `-w` or `&#x2d;&#x2d;write-out` prints the specified string after the output
- `L` or `&#x2d;&#x2d;location` follows location headers]]></description>
		<content:encoded><![CDATA[<p>`curl -s -o /dev/null &#x2d;&#x2d;head -w &#x22;%{url_effective}\n&#x22; -L &#x22;<a href="https://t.co/6e7LFNBv&#038;#x22" rel="nofollow">https://t.co/6e7LFNBv&#038;#x22</a>;`</p>
<p>- `&#x2d;&#x2d;head` or `-I` only downloads HTTP headers<br />
- `-w` or `&#x2d;&#x2d;write-out` prints the specified string after the output<br />
- `L` or `&#x2d;&#x2d;location` follows location headers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Toponce</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-116074</link>
		<dc:creator>Aaron Toponce</dc:creator>
		<pubDate>Sun, 23 Oct 2011 02:37:46 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-116074</guid>
		<description><![CDATA[@fRIOUX Schmidt- I only use ZSH, and it works fine from here. What is proto.h and Alarm.cpp? I would probably start from there.]]></description>
		<content:encoded><![CDATA[<p>@fRIOUX Schmidt- I only use ZSH, and it works fine from here. What is proto.h and Alarm.cpp? I would probably start from there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fRIOUX Schmidt</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-116073</link>
		<dc:creator>fRIOUX Schmidt</dc:creator>
		<pubDate>Sat, 22 Oct 2011 23:41:05 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-116073</guid>
		<description><![CDATA[For some reason this doesn&#039;t seem to work on zsh; when I run the final updated version here is my output:

helena [14105] ~/code/WLS «master¹» $ expandurl http://t.co/LDWqmtDM               
proto.h:/* Alarm.cpp */
proto.h:/* Alarm.cpp */


Any ideas?]]></description>
		<content:encoded><![CDATA[<p>For some reason this doesn&#8217;t seem to work on zsh; when I run the final updated version here is my output:</p>
<p>helena [14105] ~/code/WLS «master¹» $ expandurl <a href="http://t.co/LDWqmtDM" rel="nofollow">http://t.co/LDWqmtDM</a><br />
proto.h:/* Alarm.cpp */<br />
proto.h:/* Alarm.cpp */</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Weboide</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-116071</link>
		<dc:creator>Weboide</dc:creator>
		<pubDate>Fri, 21 Oct 2011 13:26:47 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-116071</guid>
		<description><![CDATA[This works the best for me. It does not create any file.
expandurl() { wget --spider -S $1 2&gt;&amp;1 &#124; grep ^Location; }]]></description>
		<content:encoded><![CDATA[<p>This works the best for me. It does not create any file.<br />
expandurl() { wget &#8211;spider -S $1 2&gt;&amp;1 | grep ^Location; }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toobuntu</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-116059</link>
		<dc:creator>toobuntu</dc:creator>
		<pubDate>Wed, 19 Oct 2011 04:45:19 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-116059</guid>
		<description><![CDATA[Well, this will return the expanded URI only:
curl -sIL http://t.co/LDWqmtDM &#124; grep &#039;^Location&#039; &#124; tail -n 1 &#124; awk &#039;{print $2}&#039;]]></description>
		<content:encoded><![CDATA[<p>Well, this will return the expanded URI only:<br />
curl -sIL <a href="http://t.co/LDWqmtDM" rel="nofollow">http://t.co/LDWqmtDM</a> | grep &#8216;^Location&#8217; | tail -n 1 | awk &#8216;{print $2}&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seth</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-116058</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Tue, 18 Oct 2011 22:50:12 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-116058</guid>
		<description><![CDATA[No discussion about something in wget is complete without the curl version:

curl -sIL http://t.co/LDWqmtDM &#124; grep &#039;^Location&#039;]]></description>
		<content:encoded><![CDATA[<p>No discussion about something in wget is complete without the curl version:</p>
<p>curl -sIL <a href="http://t.co/LDWqmtDM" rel="nofollow">http://t.co/LDWqmtDM</a> | grep &#8216;^Location&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-116057</link>
		<dc:creator>M</dc:creator>
		<pubDate>Tue, 18 Oct 2011 22:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-116057</guid>
		<description><![CDATA[Thanks, for the post and comments.]]></description>
		<content:encoded><![CDATA[<p>Thanks, for the post and comments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dexter</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-116056</link>
		<dc:creator>Dexter</dc:creator>
		<pubDate>Tue, 18 Oct 2011 19:30:41 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-116056</guid>
		<description><![CDATA[The --spider option causes wget to only make HEAD requests, so you don&#039;t have to worry about it downloading the page. The -S just makes it include the headers in the output.]]></description>
		<content:encoded><![CDATA[<p>The &#8211;spider option causes wget to only make HEAD requests, so you don&#8217;t have to worry about it downloading the page. The -S just makes it include the headers in the output.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Toponce</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-116055</link>
		<dc:creator>Aaron Toponce</dc:creator>
		<pubDate>Tue, 18 Oct 2011 19:11:10 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-116055</guid>
		<description><![CDATA[@Dexter- Awesome! I read about --spider in the manual, but it still downloads the page it lands on, which could be quite large (in the case of a PDF, for example). Instead, it appears that the &#039;-S&#039; switch is superior.]]></description>
		<content:encoded><![CDATA[<p>@Dexter- Awesome! I read about &#8211;spider in the manual, but it still downloads the page it lands on, which could be quite large (in the case of a PDF, for example). Instead, it appears that the &#8216;-S&#8217; switch is superior.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dexter</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-116053</link>
		<dc:creator>Dexter</dc:creator>
		<pubDate>Tue, 18 Oct 2011 17:47:20 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-116053</guid>
		<description><![CDATA[expandurl() { wget --spider $1 2&gt;&amp;1 &#124; grep &#039;^Location&#039; }]]></description>
		<content:encoded><![CDATA[<p>expandurl() { wget &#8211;spider $1 2&gt;&amp;1 | grep &#8216;^Location&#8217; }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Toponce</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-116052</link>
		<dc:creator>Aaron Toponce</dc:creator>
		<pubDate>Tue, 18 Oct 2011 16:34:21 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-116052</guid>
		<description><![CDATA[@Me- That is loaded with awesome-sauce. Thanks for sharing! I was thinking about if something like that was possible on the way into work this morning. Glad to see it is.]]></description>
		<content:encoded><![CDATA[<p>@Me- That is loaded with awesome-sauce. Thanks for sharing! I was thinking about if something like that was possible on the way into work this morning. Glad to see it is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Me</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-116051</link>
		<dc:creator>Me</dc:creator>
		<pubDate>Tue, 18 Oct 2011 16:30:33 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-116051</guid>
		<description><![CDATA[In the expandurl() function, changing &quot;--max-redirect=$2&quot; to &quot;--max-redirect=${2:-0}&quot; lets you skip specifying the second parameter whenever you want max-redirect set to 0.]]></description>
		<content:encoded><![CDATA[<p>In the expandurl() function, changing &#8220;&#8211;max-redirect=$2&#8243; to &#8220;&#8211;max-redirect=${2:-0}&#8221; lets you skip specifying the second parameter whenever you want max-redirect set to 0.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Profitt</title>
		<link>http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/#comment-116050</link>
		<dc:creator>Charles Profitt</dc:creator>
		<pubDate>Tue, 18 Oct 2011 14:53:32 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/?p=2083#comment-116050</guid>
		<description><![CDATA[Thanks for posting this... it certainly looks to be a much better way of trying to determine if I want to click on a shortened link. I never knew about the max redirect on wget so this has been a good lesson there as well.]]></description>
		<content:encoded><![CDATA[<p>Thanks for posting this&#8230; it certainly looks to be a much better way of trying to determine if I want to click on a shortened link. I never knew about the max redirect on wget so this has been a good lesson there as well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
