<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Tue May 21, 2013 12:50 pm by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Tue May 21, 2013 12:50 pm</pubDate>
  <lastBuildDate>Tue May 21, 2013 12:50 pm</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>Linux Format forums</title>
    <url></url>
    <link>http://linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>Re: sed query</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=97377#97377</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=5'&gt;nelz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Mar 02, 2011 4:40 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      The shell treats ' and &amp;quot; differently, variables are only expanded inside &amp;quot;, so by using ' you are passing the literal $filename_search to sed instead of the value of the variable.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=97377#97377</comments>
                                        <author>nelz</author>
                                        <pubDate>Wed Mar 02, 2011 4:40 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=97377#97377</guid>
                                      </item>
                                      <item>
                                        <title>Re: sed query</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=97374#97374</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=20905'&gt;maxeaves&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Mar 02, 2011 4:00 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Found a fix for it although it isn't elegant...&lt;br /&gt;
&lt;br /&gt;
target_filename_search=$(echo $filename_search | sed &amp;quot;s/.xml/.encodation.xml/&amp;quot;)&lt;br /&gt;
echo $target_filename_search&lt;br /&gt;
cp $media_path/$filename_search $media_path/INTRANSFER/$target_filename_search&lt;br /&gt;
&lt;br /&gt;
any thoughts on the first way to do it in sed?</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=97374#97374</comments>
                                        <author>maxeaves</author>
                                        <pubDate>Wed Mar 02, 2011 4:00 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=97374#97374</guid>
                                      </item>
                                      <item>
                                        <title>sed query</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=97372#97372</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=20905'&gt;maxeaves&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Mar 02, 2011 3:41 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Dear all,&lt;br /&gt;
&lt;br /&gt;
I've got a problem with a SED sequence....could somebody lend me some guidance please.&lt;br /&gt;
&lt;br /&gt;
ls -d $media_path/$filename_search | sed 's/${filename_search}/cp &amp;quot;&amp;amp;&amp;quot; &amp;quot;INTRANSFER\\1.encodation.xml&amp;quot;/' | sh&lt;br /&gt;
&lt;br /&gt;
I want to take a file called channel_dd-mm-yy.xml and copy it into a directory called INTRANSFER with the revised filename channel-dd-mm-yy.encodation.xml&lt;br /&gt;
&lt;br /&gt;
Using simple reg.ex, I can get things to work&lt;br /&gt;
&lt;br /&gt;
echo blahblah.xml | sed 's/.xml/.encodation.xml/'&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Max</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=97372#97372</comments>
                                        <author>maxeaves</author>
                                        <pubDate>Wed Mar 02, 2011 3:41 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=97372#97372</guid>
                                      </item></channel></rss>