<?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>DevOnLinux &#187; shell scripting</title>
	<atom:link href="http://blog.devonlinux.net/category/shell-scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.devonlinux.net</link>
	<description>ICT solutions that work</description>
	<lastBuildDate>Tue, 02 Feb 2010 23:54:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Simple map site</title>
		<link>http://blog.devonlinux.net/2010/01/12/simple-map-site/</link>
		<comments>http://blog.devonlinux.net/2010/01/12/simple-map-site/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 12:14:50 +0000</pubDate>
		<dc:creator>neuromancer</dc:creator>
				<category><![CDATA[gnu/linux]]></category>
		<category><![CDATA[shell scripting]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[site-map]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://blog.devonlinux.net/?p=198</guid>
		<description><![CDATA[A little shell script that I&#8217;ve used to generate the list of page composing a given site #!/bin/bash if [ "$#" -eq 2 ] then wget -erobots=off --mirror --delete-after --reject .jpg,.png,.gif,.swf,.css,.js,.txt,.pdf,.rtf,.odt,.doc $1 2>&#038;1 &#124;grep $1 &#124;cut -d " " -f 4 &#124;cut -d "?" -f 1 &#124; sort &#124; uniq > $2 rm -rf ${1#http://} [...]]]></description>
			<content:encoded><![CDATA[<p>A little shell script that I&#8217;ve used to generate the list of page composing a given site<br />
<code><br />
#!/bin/bash<br />
if [ "$#" -eq 2 ]<br />
then<br />
	wget -erobots=off --mirror --delete-after --reject .jpg,.png,.gif,.swf,.css,.js,.txt,.pdf,.rtf,.odt,.doc $1 2>&#038;1 |grep $1 |cut -d " " -f 4 |cut -d "?" -f 1 | sort | uniq > $2<br />
	rm -rf ${1#http://}<br />
else<br />
	echo "Usage: ./scriptname http://testsite outputfile"<br />
fi<br />
</code><br />
Save with a desired file name and give it a chmod +x and then just launch from shell:<br />
<strong>./scriptname http://testsite outputfile</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.devonlinux.net/2010/01/12/simple-map-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.231 seconds -->
