<?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>scienceoss.com &#187; bash</title>
	<atom:link href="http://scienceoss.com/tags/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://scienceoss.com</link>
	<description>useful tidbits for using open source software in science</description>
	<lastBuildDate>Wed, 26 May 2010 03:34:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>bash script: convert images</title>
		<link>http://scienceoss.com/bash-script-convert-images/</link>
		<comments>http://scienceoss.com/bash-script-convert-images/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 03:12:29 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[image]]></category>

		<guid isPermaLink="false">http://scienceoss.com/bash-script-convert-images/</guid>
		<description><![CDATA[Convert all eps files into jpeg copies in current directory and lower. #!/usr/bin/bash for f in $(find -type f -iname '*.eps') do dest=`echo ${f%.*}` echo "${f} to ${dest}.jpg" convert "${f}" "${dest}.jpg" done]]></description>
			<content:encoded><![CDATA[<p>Convert all eps files into jpeg copies in current directory and lower.</p>
<pre class="prettyprint"><code class="code">#!/usr/bin/bash
for f in $(find -type f -iname '*.eps')
do
     dest=`echo ${f%.*}`
     echo "${f} to ${dest}.jpg"
     convert "${f}" "${dest}.jpg"
done</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://scienceoss.com/bash-script-convert-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bash script: find and remove files</title>
		<link>http://scienceoss.com/bash-script-find-and-remove-files/</link>
		<comments>http://scienceoss.com/bash-script-find-and-remove-files/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 03:10:09 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[deleting files]]></category>

		<guid isPermaLink="false">http://scienceoss.com/bash-script-find-and-remove-files/</guid>
		<description><![CDATA[This bash script will find all the files matching the pattern *foo.txt. #!/usr/bin/bash for f in $(find -type f -name '*foo.txt') do echo "removing ${f}." rm "${f}" done Use -iname for case-insensitive, which will even match hidden files (files with a leading dot). The -type f means only find regular files.]]></description>
			<content:encoded><![CDATA[<p>This bash script will find all the files matching the pattern <span class="c">*foo.txt</span>.</p>
<pre class="prettyprint"><code class="code">#!/usr/bin/bash
for f in $(find -type f -name '*foo.txt')
do
    echo "removing ${f}."
    rm "${f}"
done</code></pre>
<p>Use <span class="c">-iname</span> for case-insensitive, which will even match hidden files (files with a leading dot).<br />
The <span class="c">-type f</span> means only find regular files.</p>
]]></content:encoded>
			<wfw:commentRss>http://scienceoss.com/bash-script-find-and-remove-files/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

