<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://www.linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Tue May 21, 2013 3:07 pm by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Tue May 21, 2013 3:07 pm</pubDate>
  <lastBuildDate>Tue May 21, 2013 3:07 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://www.linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>RE: Re: RE: God I hate Windows</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=31040#31040</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=5'&gt;nelz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Thu Sep 14, 2006 10:01 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      The shell expands the pattern before executing the command, so you end up with&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;cat b-1.m3u b-2.m3u ... &lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
The output from this is then redirected to the file.&lt;br /&gt;
&lt;br /&gt;
Incidentally, if you're worried about accidentally deleting the contents of a file by using &amp;gt; when you meant &amp;gt;&amp;gt;, put&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;set -o noclobber&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
in /etc/profile, ~/.bashrc or anywhere where it will be run when you start a shell. It prevents &amp;gt; writing to an existing file. When you really mean to do that, you use &amp;gt;| instead. It's saved me trashing the likes of /etc/fstab on more than one occasion.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=31040#31040</comments>
                                        <author>nelz</author>
                                        <pubDate>Thu Sep 14, 2006 10:01 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=31040#31040</guid>
                                      </item>
                                      <item>
                                        <title>Re: RE: God I hate Windows</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=31039#31039</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=5530'&gt;GMorgan&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Thu Sep 14, 2006 9:35 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;nelz wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;GMorgan wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;Doesn't the first line wipe the destination document after each pass.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
No, because you are recording the output from a single command. cat conCATenates the contents of the various files into a single stream, so there is no second output stream to overwrite the first. This is different from&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;for i in b-*.m3u; do cat $i &amp;gt;all.m3u; done&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
which would overwrite all previous passes with the last.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Cheers for the explaination. I thought it would do something like&lt;br /&gt;
&lt;br /&gt;
cat b-1.m3u &amp;gt; all.m3u&lt;br /&gt;
cat b-2.m3u &amp;gt; all.m3u&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
If it just adds all the files together then there is no problem.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=31039#31039</comments>
                                        <author>GMorgan</author>
                                        <pubDate>Thu Sep 14, 2006 9:35 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=31039#31039</guid>
                                      </item>
                                      <item>
                                        <title>Re: RE: God I hate Windows</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=31036#31036</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=5'&gt;nelz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Thu Sep 14, 2006 9:21 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;GMorgan wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;Doesn't the first line wipe the destination document after each pass.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
No, because you are recording the output from a single command. cat conCATenates the contents of the various files into a single stream, so there is no second output stream to overwrite the first. This is different from&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;for i in b-*.m3u; do cat $i &amp;gt;all.m3u; done&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
which would overwrite all previous passes with the last.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=31036#31036</comments>
                                        <author>nelz</author>
                                        <pubDate>Thu Sep 14, 2006 9:21 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=31036#31036</guid>
                                      </item>
                                      <item>
                                        <title>RE: God I hate Windows</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=31035#31035</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=60'&gt;Rhakios&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Thu Sep 14, 2006 9:07 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I think &lt;span style=&quot;font-weight: bold&quot;&gt;nelz&lt;/span&gt;'s point is that a single &amp;gt; will replace the document's contents, thus making the rm -f redundant. The double &amp;gt;&amp;gt; is usually used to append to an existing file, though it will create a new one of course.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=31035#31035</comments>
                                        <author>Rhakios</author>
                                        <pubDate>Thu Sep 14, 2006 9:07 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=31035#31035</guid>
                                      </item>
                                      <item>
                                        <title>RE: God I hate Windows</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=31034#31034</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=5530'&gt;GMorgan&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Thu Sep 14, 2006 8:34 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Doesn't the first line wipe the destination document after each pass. I might be wrong though since I've never tried it in this context.&lt;br /&gt;
&lt;br /&gt;
Problem with the second is the source documents will vary. As they add more albums I'm hoping to give them a simple script to update it for them, if they have to enter the names manually then it isn't simple. I'll try it with the pattern matching and see what falls out.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=31034#31034</comments>
                                        <author>GMorgan</author>
                                        <pubDate>Thu Sep 14, 2006 8:34 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=31034#31034</guid>
                                      </item>
                                      <item>
                                        <title>RE: God I hate Windows</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=30997#30997</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=5'&gt;nelz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Thu Sep 14, 2006 11:48 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      You can do it in one line with Linux with &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;cat b-*.m3u &amp;gt;a-allsongs.m3u&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
To concatenate files from a DOS prompt in Windows, use&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;copy \B \V src1 src2... dest&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Pattern matching may or may not work. Even if it doesn't, you can still do the job in a single line, albeit a rather long one &lt;img src=&quot;images/smiles/icon_smile.gif&quot; alt=&quot;Smile&quot; border=&quot;0&quot; /&gt;</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=30997#30997</comments>
                                        <author>nelz</author>
                                        <pubDate>Thu Sep 14, 2006 11:48 am</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=30997#30997</guid>
                                      </item>
                                      <item>
                                        <title>God I hate Windows</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=30995#30995</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=5530'&gt;GMorgan&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Thu Sep 14, 2006 11:11 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      My parents bought one of those (Linux based) Hauppauge MediaMVP's. Now it works in terms of how it was designed to work but I'm trying to get it to work as it should work using playlists. Of course this device only works in Windows despite being Linux based.&lt;br /&gt;
&lt;br /&gt;
The tool I've given them for ripping their music creates an album playlist which takes the form b-%artist%-%album%.m3u and places them all in a common directory. Now I wanted to create a script that writes every entry from these album playlists into an uber all songs playlist called a-allsongs.m3u.&lt;br /&gt;
&lt;br /&gt;
Now in Linux I'd just do this as a script&lt;br /&gt;
#rm -f a-allsongs.m3u&lt;br /&gt;
#cat b-*.m3u &amp;gt;&amp;gt; a-allsongs.m3u&lt;br /&gt;
&lt;br /&gt;
In Windows I&lt;br /&gt;
#open each playlist in notepad and drag each list across to the common file&lt;br /&gt;
&lt;br /&gt;
[sarcasm]See how easy Windows is. I managed to do it in one line there while that dirty commie OS takes 2 lines.[/sarcasm]&lt;br /&gt;
&lt;br /&gt;
Any ideas how I can achieve this one click elusiveness in Windows. I'd prefer not to install cygwin on my parents machine.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=30995#30995</comments>
                                        <author>GMorgan</author>
                                        <pubDate>Thu Sep 14, 2006 11:11 am</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=30995#30995</guid>
                                      </item></channel></rss>