<?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>Kyle BrandtTag: cue files | Kyle Brandt</title>
	<atom:link href="http://www.kbrandt.com/tag/cue-files/feed" rel="self" type="application/rss+xml" />
	<link>http://www.kbrandt.com</link>
	<description>Original computing articles by a systems administrator</description>
	<lastBuildDate>Mon, 19 Dec 2011 21:41:55 +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>Batch Convert Multiple Bin/Cue files to Iso Files in Linux</title>
		<link>http://www.kbrandt.com/2007/07/batch-convert-multiple-bincue-files-to.html</link>
		<comments>http://www.kbrandt.com/2007/07/batch-convert-multiple-bincue-files-to.html#comments</comments>
		<pubDate>Tue, 24 Jul 2007 23:17:00 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bin files]]></category>
		<category><![CDATA[cue files]]></category>

		<guid isPermaLink="false">http://www.kbrandt.com/?p=15</guid>
		<description><![CDATA[I had a bunch of bin/cue disk image files that I needed to convert to .iso files, and the program bchunk didn&#8217;t seem to have any way to process multiple files that I could see. So I came up with a command that would do this for me, so if you need to do the [...]]]></description>
			<content:encoded><![CDATA[<p>I had a bunch of <a href="http://en.wikipedia.org/wiki/Bin_cue#.BIN.2F.CUE" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/Bin_cue#.BIN.2F.CUE');">bin/cue</a> disk image files that I needed to convert to .iso files, and the program <a href="http://he.fi/bchunk/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://he.fi/bchunk/');">bchunk</a> didn&#8217;t seem to have any way to process multiple files that I could see.  So I came up with a command that would do this for me, so if you need to do the same:</p>
<ol>
<li>Install bchunk: In Ubuntu you can get it by: sudo apt-get install bchunk</li>
<li>Navigate to the directory that has your bin/cue file pairs that you want to convert.</li>
<li>You can convert them all to iso files with the following command, assuming all your bin/cue file pairs have the same root file name, and the extensions are all lowercase: for i in *.cue; do bchunk ${i/.cue}.bin ${i/.cue}.cue ${i/.cue}.iso; done</li>
<li>That should be it, hope this helps someone out.  Anyone have a better way?</li>
</ol>
<p>I will explain how this works for people trying to learn a little bit more about the command line.  The bchunk command takes three arguments, and normally would look like &#8220;bchunk foo.bin foo.cue. foo.iso&#8221;. The command is a <a href="http://en.wikipedia.org/wiki/For_loop" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/For_loop');">for loop</a>, and everything between &#8220;do&#8221; and the the last semicolon gets repeated as a whole unit for as many times as there are cue files in the current directory (This would be the <span style="font-style: italic;">loop body</span>).  The variable i represents each .cue file for each time the loop body is run.  &#8220;${i/.cue}&#8221; strips the file name of its extension (So really &#8220;${i/.cue}.cue&#8221; is redundant) and the extension that bchunk expects is added with what follows the curly braces.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kbrandt.com/2007/07/batch-convert-multiple-bincue-files-to.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

