<?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>The eflow blog</title>
	<atom:link href="http://blog.eflow.org/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.eflow.org</link>
	<description>Insert some amazingly witty tagline here</description>
	<lastBuildDate>Sat, 27 Feb 2010 04:41:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Newest Openmrs Addition</title>
		<link>http://blog.eflow.org/archives/307</link>
		<comments>http://blog.eflow.org/archives/307#comments</comments>
		<pubDate>Sat, 27 Feb 2010 04:41:07 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[babble]]></category>
		<category><![CDATA[openmrs]]></category>
		<category><![CDATA[andy]]></category>
		<category><![CDATA[baby]]></category>

		<guid isPermaLink="false">http://blog.eflow.org/?p=307</guid>
		<description><![CDATA[ My wife gave birth to our first son on Saturday: Benjamin Andrew Wolfe.  He was a very healthy 8 pounds and 21 inches long.  He has been eating and sleeping very well.  Sleep is at a premium in the Wolfe household and we take it whenever we can get it.  [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.eflow.org/wp-content/uploads/2010/02/Andy-sleeping-in-front-of-computer-300x240.jpg" alt="Andy sleeping in front of computer" title="Andy sleeping in front of computer" width="300" height="240" class="alignright size-medium wp-image-309" style="float: right; border: 3px solid #669999; padding: 3px; margin: 4px" /> My wife gave birth to our first son on Saturday: Benjamin Andrew Wolfe.  He was a very healthy 8 pounds and 21 inches long.  He has been eating and sleeping very well.  Sleep is at a premium in the Wolfe household and we take it whenever we can get it.  Our daughter, Eden, is 14 months old, and does her best to keep us both up all day to play with her!</p>
<p>I&#8217;ve been attempting to keep up with email while at home, but Andy has been fighting me for computer time!</p>
 <img src="http://blog.eflow.org/wp-content/plugins/feed-statistics.php?view=1&post_id=307" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.eflow.org/archives/307/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ignoring Foreign Key Checks in Liquibase</title>
		<link>http://blog.eflow.org/archives/143</link>
		<comments>http://blog.eflow.org/archives/143#comments</comments>
		<pubDate>Wed, 10 Feb 2010 01:17:53 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[babble]]></category>
		<category><![CDATA[liquibase]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.eflow.org/?p=143</guid>
		<description><![CDATA[This seems fairly simple in hindsight, but I had a difficult time finding an answer to it, so I putting it down here for posterity&#8217;s sake.

 
     SET FOREIGN_KEY_CHECKS=0
 

I put this as the first changeset in a liquibase xml file.  This disables the foreign key and constraint checking in [...]]]></description>
			<content:encoded><![CDATA[<p>This seems fairly simple in hindsight, but I had a difficult time finding an answer to it, so I putting it down here for posterity&#8217;s sake.</p>
<blockquote><p>
 <changeSet author="ben" id="disable-foreign-key-checks" runAlways="true" dbms="mysql"><br />
     <sql>SET FOREIGN_KEY_CHECKS=0</sql><br />
 </changeSet>
</p></blockquote>
<p>I put this as the first changeset in a liquibase xml file.  This disables the foreign key and constraint checking in mysql. This would work for other db&#8217;s as well, but I haven&#8217;t looked up their syntax just yet.  </p>
 <img src="http://blog.eflow.org/wp-content/plugins/feed-statistics.php?view=1&post_id=143" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.eflow.org/archives/143/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screencasting in Ubuntu</title>
		<link>http://blog.eflow.org/archives/46</link>
		<comments>http://blog.eflow.org/archives/46#comments</comments>
		<pubDate>Sun, 31 Jan 2010 16:22:33 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[babble]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.eflow.org/?p=46</guid>
		<description><![CDATA[After futile searches and a lot of old pages, I finally found a linux screencast tool: recordmydesktop.
Using the synaptic package manager, I installed recordmydesktop.  Eventually I discovered that this was not the gui part of the program and installed gtk-recordmydesktop.
I&#8217;ve been very happy with the results.
 ]]></description>
			<content:encoded><![CDATA[<p>After futile searches and a lot of old pages, I finally found a <a href="http://en.wikipedia.org/wiki/RecordMyDesktop">linux screencast</a> tool: recordmydesktop.</p>
<p>Using the synaptic package manager, I installed recordmydesktop.  Eventually I discovered that this was not the gui part of the program and installed <b>gtk-recordmydesktop</b>.</p>
<p>I&#8217;ve been very happy with the results.</p>
 <img src="http://blog.eflow.org/wp-content/plugins/feed-statistics.php?view=1&post_id=46" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.eflow.org/archives/46/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Night Clock</title>
		<link>http://blog.eflow.org/archives/274</link>
		<comments>http://blog.eflow.org/archives/274#comments</comments>
		<pubDate>Sun, 24 Jan 2010 01:15:44 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[babble]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[kenya]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://blog.eflow.org/?p=274</guid>
		<description><![CDATA[Kenya seems to loathe alarm clocks.  Ubuntu&#8217;s clock screen saver is sub-par, so I wrote a quick javascript clock to open in my browser and display all night long.
nightclock.html
After opening the file in your favorite browser you can press F11 to hide all the toolbars.
 ]]></description>
			<content:encoded><![CDATA[<p>Kenya seems to loathe alarm clocks.  Ubuntu&#8217;s clock screen saver is sub-par, so I wrote a quick javascript clock to open in my browser and display all night long.</p>
<p><a href='http://blog.eflow.org/wp-content/uploads/2010/01/nightclock.html'>nightclock.html</a></p>
<p>After opening the file in your favorite browser you can press F11 to hide all the toolbars.</p>
 <img src="http://blog.eflow.org/wp-content/plugins/feed-statistics.php?view=1&post_id=274" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.eflow.org/archives/274/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting Everio MOV Files to FLV Using FFMPEG</title>
		<link>http://blog.eflow.org/archives/267</link>
		<comments>http://blog.eflow.org/archives/267#comments</comments>
		<pubDate>Fri, 15 Jan 2010 01:07:12 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[babble]]></category>
		<category><![CDATA[everio]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[jvc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mov]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.eflow.org/?p=267</guid>
		<description><![CDATA[I struggled with getting the mpeg2 movies from my JVC Everio HD camera into a smaller file and up onto a video sharing site with high quality.
My first attempt was with Handbrake.  That converted the MOV to an MP4 very nicely.  However, I wasn&#8217;t able to upload those to Blip.tv and have them [...]]]></description>
			<content:encoded><![CDATA[<p>I struggled with getting the mpeg2 movies from my JVC Everio HD camera into a smaller file and up onto a video sharing site with high quality.</p>
<p>My first attempt was with <a href="http://handbrake.fr/">Handbrake</a>.  That converted the MOV to an MP4 very nicely.  However, I wasn&#8217;t able to upload those to <a href="http://blip.tv">Blip.tv</a> and have them convert successfully every time to an flv.  Blip was timing out on the longer videos and poorly converting the smaller ones.</p>
<p>I then decided to try the command line ffmpeg.  There weren&#8217;t any gui tools around it that I found in the repo&#8217;s, so I just tried the standard </p>
<blockquote><p>
ffmpeg -i inputfilename.mov outputfilename.flv
</p></blockquote>
<p>but that <strong>did not work</strong>.  Apparently JVC doesn&#8217;t put all the right properties into the mpg2 for ffmpeg to automatically pick up the properties because I kept getting a Floating point exception. </p>
<p>I assumed I needed to just manually set the full command with all the different video and audio settings, but I didn&#8217;t know what those should be.</p>
<p>After a bit more googling I found <a href="http://winff.org">winff</a>.  From that app I copied the command line arguments over, tweaked them a bit, and came out with this:</p>
<blockquote><p>
ffmpeg -i INPUTFILENAME.mov -vcodec libx264 -deinterlace -vpre hq -crf 22 -r 29.97 -s 960&#215;540 -aspect 16:9 -bf 2 -b 2000kb -ac 1 -ar 22050 -ab 96k OUTPUTFILENAME.flv
</p></blockquote>
<p>The trick is to use the libx264 codec instead of the flv one.  After uploading these converted movies to <a href="http://blip.tv">Blip.tv</a> I was pleased with the results.</p>
 <img src="http://blog.eflow.org/wp-content/plugins/feed-statistics.php?view=1&post_id=267" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.eflow.org/archives/267/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating UUID Column in the Large Obs Table</title>
		<link>http://blog.eflow.org/archives/276</link>
		<comments>http://blog.eflow.org/archives/276#comments</comments>
		<pubDate>Thu, 07 Jan 2010 15:43:04 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[openmrs]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[uuid]]></category>

		<guid isPermaLink="false">http://blog.eflow.org/?p=276</guid>
		<description><![CDATA[We have well over 50 million rows in our obs table.  Using the simple &#8220;update obs set uuid = uuid() where uuid is null&#8221; would bomb out with a &#8220;The total number of locks exceeds the lock table size&#8221; error.
I ran this for a few hours to get through all rows.  (Note that [...]]]></description>
			<content:encoded><![CDATA[<p>We have well over 50 million rows in our obs table.  Using the simple &#8220;update obs set uuid = uuid() where uuid is null&#8221; would bomb out with a &#8220;The total number of locks exceeds the lock table size&#8221; error.</p>
<p>I ran this for a few hours to get through all rows.  (Note that it overwrites any uuids that are currently there)</p>
<p>Copy this into a sql script and run it with &#8220;source&#8221; in mysql at command line.</p>
<blockquote><p>
drop procedure update_uuids;<br />
delimiter //<br />
create procedure update_uuids() begin<br />
set @max = (select max(obs_id) from obs);<br />
set @x = 1;<br />
repeat<br />
set @y = @x + 100000;<br />
update obs set uuid = uuid() where obs_id >=@x and obs_id <@y;<br />
set @x = @y;<br />
until @x > @max<br />
end repeat;<br />
end<br />
//<br />
delimiter ;<br />
call update_uuids();
</p></blockquote>
 <img src="http://blog.eflow.org/wp-content/plugins/feed-statistics.php?view=1&post_id=276" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.eflow.org/archives/276/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OpenMRS Database Creation Error &#8211; Errcode 17</title>
		<link>http://blog.eflow.org/archives/268</link>
		<comments>http://blog.eflow.org/archives/268#comments</comments>
		<pubDate>Mon, 19 Oct 2009 09:12:31 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[babble]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[liquibase]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[openmrs]]></category>

		<guid isPermaLink="false">http://blog.eflow.org/?p=268</guid>
		<description><![CDATA[A programmer here at AMPATH (Gilbert Tuwei) had some issues installing mysql.  The error message was very unhelpful and the solution was equally puzzling, so I want to put here to for the mighty google to find.
Tuwei was running v5.0.17 of MySQL.  Upgrading to version 5.1.31 made the problem disappear.
WARN &#8211; InitializationFilter$InitializationCompletion$1.run(823) &#124;2009-10-02 [...]]]></description>
			<content:encoded><![CDATA[<p>A programmer here at AMPATH (Gilbert Tuwei) had some issues installing mysql.  The error message was very unhelpful and the solution was equally puzzling, so I want to put here to for the mighty google to find.</p>
<p>Tuwei was running v5.0.17 of MySQL.  Upgrading to version 5.1.31 made the problem disappear.</p>
<blockquote><p>WARN &#8211; InitializationFilter$InitializationCompletion$1.run(823) |2009-10-02 15:24:21,000| Error while trying to update to the latest database version<br />
org.openmrs.util.DatabaseUpdateException: There was an error while updating the database to the latest. file: liquibase-update-to-latest.xml. Error: Migration failed for change set liquibase-update-to-latest.xml::2::upul:<br />
     Reason:<br />
          java.sql.SQLException: Can&#8217;t create/write to file &#8216;C:\WINDOWS\TEMP\#sql_fe4_0.MYI&#8217; (Errcode: 17):<br />
          Caused By: Precondition Error<br />
	at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:145)<br />
	at org.openmrs.web.filter.initialization.InitializationFilter$InitializationCompletion$1.run(InitializationFilter.java:817)<br />
	at java.lang.Thread.run(Unknown Source)<br />
Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase-update-to-latest.xml::2::upul:<br />
     Reason:<br />
          java.sql.SQLException: Can&#8217;t create/write to file &#8216;C:\WINDOWS\TEMP\#sql_fe4_0.MYI&#8217; (Errcode: 17):<br />
          Caused By: Precondition Error<br />
	at liquibase.ChangeSet.execute(ChangeSet.java:204)<br />
	at liquibase.parser.visitor.UpdateVisitor.visit(UpdateVisitor.java:26)<br />
	at org.openmrs.util.DatabaseUpdater$1OpenmrsUpdateVisitor.visit(DatabaseUpdater.java:177)<br />
	at liquibase.parser.ChangeLogIterator.run(ChangeLogIterator.java:41)<br />
	at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:201)<br />
	at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:142)<br />
	&#8230; 2 more<br />
Caused by: liquibase.exception.PreconditionErrorException: Precondition Error<br />
	at liquibase.preconditions.ForeignKeyExistsPrecondition.check(ForeignKeyExistsPrecondition.java:36)<br />
	at liquibase.preconditions.NotPrecondition.check(NotPrecondition.java:18)<br />
	at liquibase.preconditions.AndPrecondition.check(AndPrecondition.java:21)<br />
	at liquibase.ChangeSet.execute(ChangeSet.java:169)<br />
	&#8230; 7 more</p></blockquote>
 <img src="http://blog.eflow.org/wp-content/plugins/feed-statistics.php?view=1&post_id=268" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.eflow.org/archives/268/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy SVN Conflict Resolution</title>
		<link>http://blog.eflow.org/archives/239</link>
		<comments>http://blog.eflow.org/archives/239#comments</comments>
		<pubDate>Mon, 29 Jun 2009 20:07:14 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[babble]]></category>
		<category><![CDATA[openmrs]]></category>

		<guid isPermaLink="false">http://blog.eflow.org/?p=239</guid>
		<description><![CDATA[Our method for merging branches back to trunk:

branch> svn merge from trunk [rev_last_merged_from_trunk]:[HEAD]
branch> (resolve conflicts, deploy, test)
branch> commit
(at this point, the branch should be exactly what trunk has plus all changes done in the branch)
trunk> svn merge from branch [rev_first_branched_from_trunk]:[HEAD]

For some reason svn still sees a ton of conflicts when doing that last step.  [...]]]></description>
			<content:encoded><![CDATA[<p>Our method for merging branches back to trunk:</p>
<ul>
<li>branch> svn merge from trunk [rev_last_merged_from_trunk]:[HEAD]
<li>branch> (resolve conflicts, deploy, test)
<li>branch> commit<br />
(at this point, the branch should be exactly what trunk has plus all changes done in the branch)</p>
<li>trunk> svn merge from branch [rev_first_branched_from_trunk]:[HEAD]
</ul>
<p>For some reason svn still sees a ton of conflicts when doing that last step.  In the past I would have to manually go through each file and just copy what was in the branch on top of trunk and then &#8220;mark resolved&#8221;.  However, now there is a faster way:  Using at least SVN v1.5 at command line:</p>
<blockquote><p>svn resolve -R &#8211;accept theirs-full *</p></blockquote>
<p>Thats it!  Its a life saver.  Or at least a time saver.</p>
<p>(This can be dangerous.  Make sure you have resolved all true conflicts in the branch before doing the &#8220;resolve all&#8221;)</p>
 <img src="http://blog.eflow.org/wp-content/plugins/feed-statistics.php?view=1&post_id=239" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.eflow.org/archives/239/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Internal Mic Fixed on Skype + Jaunty</title>
		<link>http://blog.eflow.org/archives/257</link>
		<comments>http://blog.eflow.org/archives/257#comments</comments>
		<pubDate>Mon, 15 Jun 2009 20:01:41 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[babble]]></category>
		<category><![CDATA[jaunty]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.eflow.org/?p=257</guid>
		<description><![CDATA[Finally, a solution to the internal microphone not working in Skype on Ubuntu!  Ever since upgrading to Jaunty I haven&#8217;t been able to use my IBM Thinkpad&#8217;s built-in mic for skype calls.  Very inconvenient to say the least.
I stumbled across the sound edit controls today: 

Left click on the sou
nd applet in the [...]]]></description>
			<content:encoded><![CDATA[<p>Finally, a solution to the internal microphone not working in Skype on Ubuntu!  Ever since upgrading to Jaunty I haven&#8217;t been able to use my IBM Thinkpad&#8217;s built-in mic for skype calls.  Very inconvenient to say the least.</p>
<p>I stumbled across the sound edit controls today: </p>
<ol>
<li>Left click on the sou<br />
nd applet in the system tray and click &#8220;Volume Control&#8221;.</p>
<li>Unmute the &#8220;Microphone&#8221;
</ol>
<p>I never knew this existed!  Its not in my admin menu anywhere.</p>
<p>(I apologize to Pulse Audio for the many curse words erroneously thrown in its direction over this)</p>
 <img src="http://blog.eflow.org/wp-content/plugins/feed-statistics.php?view=1&post_id=257" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.eflow.org/archives/257/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Uuids XML Attribute &#8211; Sed Script</title>
		<link>http://blog.eflow.org/archives/238</link>
		<comments>http://blog.eflow.org/archives/238#comments</comments>
		<pubDate>Wed, 20 May 2009 16:50:41 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[openmrs]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[sh]]></category>
		<category><![CDATA[uuid]]></category>

		<guid isPermaLink="false">http://blog.eflow.org/?p=238</guid>
		<description><![CDATA[OpenMRS recently added a non-null uuid column to every table.  All of our dbunit xml files needed to be updated to insert values for this attribute.  I wrote the following shell script to loop over all xml files under the current folder and add a uuid attribute to all rows that didn&#8217;t have an attribute [...]]]></description>
			<content:encoded><![CDATA[<p>OpenMRS recently added a non-null uuid column to every table.  All of our dbunit xml files needed to be updated to insert values for this attribute.  I wrote the following shell script to loop over all xml files under the current folder and add a uuid attribute to all rows that didn&#8217;t have an attribute already.  There is a bit of logic in there to ignore certain tables because those tables didn&#8217;t actually get any uuids.</p>
<p><span id="more-238"></span></p>
<p>You also can download the <a href="http://blog.eflow.org/wp-content/uploads/2009/05/add_uuids.sh">add_uuids</a> script.</p>
<blockquote>
<pre>
#!/bin/sh

# This script adds a uuid entry to each element in an xml file
# Author: Ben Wolfe - Apr 2009
# http://blog.eflow.org

date
path=`pwd`

# get a flat list of all files under the current directory
f=`ls -RlQ | awk -v PATH=$path '{ \
if ($1 ~ /.*:$/) \
path = substr($1,3,length($1)-4); \
else \
if ($0 ~ /^-/) \
printf("%s%s/%s\n", PATH, path, \
substr($0, match($0,"\".*\"")+1, RLENGTH-2) \
) \
}'`

# create a sed command that adds a generated uuid attribute to all elements that don't contain uuid:
# @UUIDGEN@ needs to get replaced later with the generated uuid
command="/uuid/!{s/\/>/ uuid=\"@UUIDGEN@\"\/>/}"
# ignore rows with &lt;users, &lt;patient, &lt;user_role, &lt;location_tag, &lt;concept_word, &lt;user_privilege, etc because they don't have a uuid column
for word in "&lt;patient " "&lt;user_role " "&lt;location_tag " "&lt;concept_word " "&lt;concept_numeric " "&lt;concept_derived " "&lt;complex_obs " "&lt;role_role " "&lt;role_privilege " "&lt;scheduled_task_config " "&lt;scheduler_task_config_property " "&lt;drug_order " "&lt;concept_complex " "&lt;concept_name_tag_map " "&lt;cohort " "&lt;cohort_member " "&lt;location_tag_map " "&lt;users "
do
   command="/$word/!{$command}"
done

for i in $f
do
#ignore the .svn folder contents
if ! echo $i | grep .svn > /dev/null;
then
    # get the file's extension
    ext=`echo "$i" | awk -F . '{print $NF}'`

    # only execute on xml files
    case $ext in
         xml)
            echo acting on $i

            # blank out the IFS variable so that the "while read line" doesn't delete leading whitespace
            OIFS=$IFS
            IFS=

            while read line
            do
                uuid=`uuidgen`
                newcommand=`echo $command | sed -e "s/@UUIDGEN@/$uuid/"`
                # run the command on the current line
                echo "$line" | sed -e "$newcommand" >> $i.new
            done < $i

            # reset the IFS variable to what it was before
            IFS=$OIFS

            mv -f "$i.new" "$i"

            ;;
        *)
            echo invalid extension: $ext
            ;;
        esac
fi
done

echo "done"
date
</pre>
</blockquote>
 <img src="http://blog.eflow.org/wp-content/plugins/feed-statistics.php?view=1&post_id=238" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.eflow.org/archives/238/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
