<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: cmd.exe for Linux zealots</title>
	<atom:link href="http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/feed/" rel="self" type="application/rss+xml" />
	<link>http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/</link>
	<description>All About GNU/Linux and BSD - reviews, comparisons, articles</description>
	<lastBuildDate>Sun, 13 May 2012 17:43:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Alexa</title>
		<link>http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-195465</link>
		<dc:creator>Alexa</dc:creator>
		<pubDate>Sun, 11 Mar 2012 01:00:29 +0000</pubDate>
		<guid isPermaLink="false">http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-195465</guid>
		<description>Very good web site. I like your posting comments system. I am sorry for the off-topic post, yet I was extremely astounded with Djokovic&#039;s play in the final of the Australia OPen this year. The man is just unbeatable. He proved he had been as solid as iron. Only consider about he he could whip Nadal who had previously been so motivated to succeed as well as was really so pumped up in the 5th set. I am beginning to think that Djokovic is doing some spiritual work to take some forces on his side that help him secure this kind of matches up against the greatest players in the globe 
&lt;a href=&quot;http://www.royalessays.com&quot; rel=&quot;nofollow&quot;&gt;buy essays no plagiarism&lt;/a&gt;. Whats your opinion with regards to Rafa&#039;s game?</description>
		<content:encoded><![CDATA[<p>Very good web site. I like your posting comments system. I am sorry for the off-topic post, yet I was extremely astounded with Djokovic&#8217;s play in the final of the Australia OPen this year. The man is just unbeatable. He proved he had been as solid as iron. Only consider about he he could whip Nadal who had previously been so motivated to succeed as well as was really so pumped up in the 5th set. I am beginning to think that Djokovic is doing some spiritual work to take some forces on his side that help him secure this kind of matches up against the greatest players in the globe<br />
<a href="http://www.royalessays.com" rel="nofollow">buy essays no plagiarism</a>. Whats your opinion with regards to Rafa&#8217;s game?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evan</title>
		<link>http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-132911</link>
		<dc:creator>Evan</dc:creator>
		<pubDate>Fri, 15 Jan 2010 22:41:25 +0000</pubDate>
		<guid isPermaLink="false">http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-132911</guid>
		<description>Those commands aren&#039;t *quite* the same; Goten&#039;s only shows .flac files one level down.

That said, it does lead into another &quot;classic example&quot; of how Bash can (only occasionally, but definitely occasionally) be harder to use: list all .flac files in *any* subdirectory of where you are now, not just one level down.

In cmd, it&#039;s easy; &#039;dir /s *.flac&#039; as John said. In Bash... well, until recently, you have to use find. &#039;find . -name &quot;*.flac&quot;&#039;. find is one of those utilities that is not exactly easy to learn to use... even for simple queries like that, for a while I was using &#039;find . &#124; grep &quot;.flac&quot;&#039;.

In other words, you had to completely change the program you&#039;re calling. ls can list files by pattern (&#039;ls *.flac&#039;), and ls can list a directory recursively (&#039;ls -R&#039;), but you can&#039;t combine the two tasks with ls itself. (Of course the reason is that it wasn&#039;t really ls that was listing files by pattern, it was the shell.)

A similar thing comes up with the following task: search through all .c files in a subdirectory of the current one for a particular string &quot;foo&quot;. In Bash: &#039;find -name &quot;*.c&quot; -print0 &#124; xargs -0 grep -H foo&#039;. (You could also do the same thing with {}, but I never remember how to use that syntax.) There&#039;s a bunch of different gotchas in that. In addition to figuring out the general idea in the first place, if you leave off the -print0 and -0, file names with spaces will cause it to fail. If you leave off the -H, you&#039;ll see matching lines, but you&#039;ll have no idea what file they&#039;re in. In Windows, &#039;findstr /s REACHABLE *.c&#039;. The only thing additional you have to do to make the search recursive is add /s.

(GNU grep contains the &#039;--include&#039; flag; paired with --recursive is the *right* way to do this search now. However, this is a relatively recent addition.)

You get used to this after a while -- recursive queries take find -- but for a newcomer, it can be hard for a while.

(Finally, Bash 4 introduced the ** feature which mostly obviates my immediate arguments above. &#039;ls **/*.flac&#039; and &#039;grep foo **/*.c&#039; now do what you want, as long as you don&#039;t overrun the command line length. (OTOH, this *is* sometimes a real problem.) However, this is a *very* recent addition to Bash, with Bash 4 being less than a year old. Zsh has had it for longer, but no one uses it for some reason despite it kicking the pants off of Bash.)</description>
		<content:encoded><![CDATA[<p>Those commands aren&#8217;t *quite* the same; Goten&#8217;s only shows .flac files one level down.</p>
<p>That said, it does lead into another &#8220;classic example&#8221; of how Bash can (only occasionally, but definitely occasionally) be harder to use: list all .flac files in *any* subdirectory of where you are now, not just one level down.</p>
<p>In cmd, it&#8217;s easy; &#8216;dir /s *.flac&#8217; as John said. In Bash&#8230; well, until recently, you have to use find. &#8216;find . -name &#8220;*.flac&#8221;&#8216;. find is one of those utilities that is not exactly easy to learn to use&#8230; even for simple queries like that, for a while I was using &#8216;find . | grep &#8220;.flac&#8221;&#8216;.</p>
<p>In other words, you had to completely change the program you&#8217;re calling. ls can list files by pattern (&#8216;ls *.flac&#8217;), and ls can list a directory recursively (&#8216;ls -R&#8217;), but you can&#8217;t combine the two tasks with ls itself. (Of course the reason is that it wasn&#8217;t really ls that was listing files by pattern, it was the shell.)</p>
<p>A similar thing comes up with the following task: search through all .c files in a subdirectory of the current one for a particular string &#8220;foo&#8221;. In Bash: &#8216;find -name &#8220;*.c&#8221; -print0 | xargs -0 grep -H foo&#8217;. (You could also do the same thing with {}, but I never remember how to use that syntax.) There&#8217;s a bunch of different gotchas in that. In addition to figuring out the general idea in the first place, if you leave off the -print0 and -0, file names with spaces will cause it to fail. If you leave off the -H, you&#8217;ll see matching lines, but you&#8217;ll have no idea what file they&#8217;re in. In Windows, &#8216;findstr /s REACHABLE *.c&#8217;. The only thing additional you have to do to make the search recursive is add /s.</p>
<p>(GNU grep contains the &#8216;&#8211;include&#8217; flag; paired with &#8211;recursive is the *right* way to do this search now. However, this is a relatively recent addition.)</p>
<p>You get used to this after a while &#8212; recursive queries take find &#8212; but for a newcomer, it can be hard for a while.</p>
<p>(Finally, Bash 4 introduced the ** feature which mostly obviates my immediate arguments above. &#8216;ls **/*.flac&#8217; and &#8216;grep foo **/*.c&#8217; now do what you want, as long as you don&#8217;t overrun the command line length. (OTOH, this *is* sometimes a real problem.) However, this is a *very* recent addition to Bash, with Bash 4 being less than a year old. Zsh has had it for longer, but no one uses it for some reason despite it kicking the pants off of Bash.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-124456</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 23 Sep 2008 11:45:52 +0000</pubDate>
		<guid isPermaLink="false">http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-124456</guid>
		<description>Goten Xiao: Try the /S flag
from dir /?:
/S          Displays files in specified directory and all subdirectories.

Try 
dir /s *.flac
dir /s /b *.flac 
will keep it from showing file size, etc.</description>
		<content:encoded><![CDATA[<p>Goten Xiao: Try the /S flag<br />
from dir /?:<br />
/S          Displays files in specified directory and all subdirectories.</p>
<p>Try<br />
dir /s *.flac<br />
dir /s /b *.flac<br />
will keep it from showing file size, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Goten Xiao</title>
		<link>http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-121573</link>
		<dc:creator>Goten Xiao</dc:creator>
		<pubDate>Fri, 30 May 2008 13:12:20 +0000</pubDate>
		<guid isPermaLink="false">http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-121573</guid>
		<description>A classic example of why cmd is unusable; of why it is a toy, and why I can&#039;t use it efficiently compared to bash, zsh, tcsh or ksh.

&lt;blockquote&gt;
G:\music&gt;dir/w
 Volume in drive G has no label.
 Volume Serial Number is 4786-4F2F

 Directory of G:\music

[.]                                             [..]
[{2005} Octavarium [FLAC]]                      [{2002} Six Degrees of Inner Turbulence [FLAC]]
[misc]
               0 File(s)              0 bytes
               5 Dir(s)     694,267,904 bytes free

G:\music&gt;dir *\*.flac
The filename, directory name, or volume label syntax is incorrect.
&lt;/blockquote&gt;

Now, compare and contrast to the equivalent in bash:
&lt;blockquote&gt;
goten@r2d3:~/tmp15$ ls
{2002} Six Degrees of Inner Turbulence [FLAC]  {2005} Octavarium [FLAC]  misc
goten@r2d3:~/tmp15$ ls */*.flac
{2002} Six Degrees of Inner Turbulence [FLAC]/[Â°1] The Glass Prison.flac  {2005} Octavarium [FLAC]/[03] These Walls.flac
{2002} Six Degrees of Inner Turbulence [FLAC]/[Â°2] Blind Faith.flac       {2005} Octavarium [FLAC]/[04] I Walk Beside You.flac
{2002} Six Degrees of Inner Turbulence [FLAC]/[Â°3] Misunderstood.flac     {2005} Octavarium [FLAC]/[05] Panic Attack.flac
{2002} Six Degrees of Inner Turbulence [FLAC]/[Â°4] The Great Debate.flac  {2005} Octavarium [FLAC]/[06] Never Enough.flac
{2002} Six Degrees of Inner Turbulence [FLAC]/[Â°5] Disappear.flac         {2005} Octavarium [FLAC]/[07] Sacrificed Sons.flac
{2005} Octavarium [FLAC]/[01] The Root of All Evil.flac                   {2005} Octavarium [FLAC]/[08] Octavarium.flac
{2005} Octavarium [FLAC]/[02] The Answer Lies Within.flac
&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>A classic example of why cmd is unusable; of why it is a toy, and why I can&#8217;t use it efficiently compared to bash, zsh, tcsh or ksh.</p>
<blockquote><p>
G:\music&gt;dir/w<br />
 Volume in drive G has no label.<br />
 Volume Serial Number is 4786-4F2F</p>
<p> Directory of G:\music</p>
<p>[.]                                             [..]<br />
[{2005} Octavarium [FLAC]]                      [{2002} Six Degrees of Inner Turbulence [FLAC]]<br />
[misc]<br />
               0 File(s)              0 bytes<br />
               5 Dir(s)     694,267,904 bytes free</p>
<p>G:\music&gt;dir *\*.flac<br />
The filename, directory name, or volume label syntax is incorrect.
</p></blockquote>
<p>Now, compare and contrast to the equivalent in bash:</p>
<blockquote><p>
goten@r2d3:~/tmp15$ ls<br />
{2002} Six Degrees of Inner Turbulence [FLAC]  {2005} Octavarium [FLAC]  misc<br />
goten@r2d3:~/tmp15$ ls */*.flac<br />
{2002} Six Degrees of Inner Turbulence [FLAC]/[Â°1] The Glass Prison.flac  {2005} Octavarium [FLAC]/[03] These Walls.flac<br />
{2002} Six Degrees of Inner Turbulence [FLAC]/[Â°2] Blind Faith.flac       {2005} Octavarium [FLAC]/[04] I Walk Beside You.flac<br />
{2002} Six Degrees of Inner Turbulence [FLAC]/[Â°3] Misunderstood.flac     {2005} Octavarium [FLAC]/[05] Panic Attack.flac<br />
{2002} Six Degrees of Inner Turbulence [FLAC]/[Â°4] The Great Debate.flac  {2005} Octavarium [FLAC]/[06] Never Enough.flac<br />
{2002} Six Degrees of Inner Turbulence [FLAC]/[Â°5] Disappear.flac         {2005} Octavarium [FLAC]/[07] Sacrificed Sons.flac<br />
{2005} Octavarium [FLAC]/[01] The Root of All Evil.flac                   {2005} Octavarium [FLAC]/[08] Octavarium.flac<br />
{2005} Octavarium [FLAC]/[02] The Answer Lies Within.flac
</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sanders MSMVP</title>
		<link>http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-119750</link>
		<dc:creator>Sanders MSMVP</dc:creator>
		<pubDate>Sun, 13 Apr 2008 23:48:58 +0000</pubDate>
		<guid isPermaLink="false">http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-119750</guid>
		<description>Anyone who has worked on both operating systems will release Sanders is talking out of his arse.  You don&#039;t &quot;upgrade the entire operating system to upgrade open office&quot; nor any other program on it.  Unless you are either using a very, very, very old version of Linux or are being paid to spread pure lies.

Second, Linux can use Windows domains quite easily and act as a domain controller itself.  Please, if you are going to be a paid shill at least be honest and upfront.</description>
		<content:encoded><![CDATA[<p>Anyone who has worked on both operating systems will release Sanders is talking out of his arse.  You don&#8217;t &#8220;upgrade the entire operating system to upgrade open office&#8221; nor any other program on it.  Unless you are either using a very, very, very old version of Linux or are being paid to spread pure lies.</p>
<p>Second, Linux can use Windows domains quite easily and act as a domain controller itself.  Please, if you are going to be a paid shill at least be honest and upfront.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tzafrir Cohen</title>
		<link>http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-119734</link>
		<dc:creator>Tzafrir Cohen</dc:creator>
		<pubDate>Sun, 13 Apr 2008 15:57:15 +0000</pubDate>
		<guid isPermaLink="false">http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-119734</guid>
		<description>One baisc weakness of cmd.exe&#039;s syntax is the variable expansion is different in scripts than in the CLI (%% vs. %).

Not to mention backticks, decent redirection (2&gt;/dev/null), and such.

The author manages to completely miss the point regarding package management. For example: what is the equivalent of &#039;apt-get upgrade&#039;?  

Maybe the Windows-Updates facility has been automated (and maybe not). But it does not update any thinrd-party product installed. Because without a repository the system does not know where to pull updates from.

Now do that on 100 workstations.</description>
		<content:encoded><![CDATA[<p>One baisc weakness of cmd.exe&#8217;s syntax is the variable expansion is different in scripts than in the CLI (%% vs. %).</p>
<p>Not to mention backticks, decent redirection (2&gt;/dev/null), and such.</p>
<p>The author manages to completely miss the point regarding package management. For example: what is the equivalent of &#8216;apt-get upgrade&#8217;?  </p>
<p>Maybe the Windows-Updates facility has been automated (and maybe not). But it does not update any thinrd-party product installed. Because without a repository the system does not know where to pull updates from.</p>
<p>Now do that on 100 workstations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Ring</title>
		<link>http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-119730</link>
		<dc:creator>Peter Ring</dc:creator>
		<pubDate>Sun, 13 Apr 2008 11:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-119730</guid>
		<description>PowerShell is worthwhile for all kinds of automation on Windows, comes built-in with Windows Server 2008, and is easily installed on Windows XP SP2 or later.

&lt;a href=&quot;http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx&quot; rel=&quot;nofollow&quot;&gt;Windows PowerShell&lt;/a&gt;

&lt;a href=&quot;http://blogs.msdn.com/PowerShell/&quot; rel=&quot;nofollow&quot;&gt;Blog of Windows PowerShell team&lt;/a&gt;

I&#039;d also like to mention a hidden gem, &lt;a href=&quot;http://www.microsoft.com/technet/scriptcenter/tools/logparser/default.mspx&quot; rel=&quot;nofollow&quot;&gt;LogParser&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>PowerShell is worthwhile for all kinds of automation on Windows, comes built-in with Windows Server 2008, and is easily installed on Windows XP SP2 or later.</p>
<p><a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx" rel="nofollow">Windows PowerShell</a></p>
<p><a href="http://blogs.msdn.com/PowerShell/" rel="nofollow">Blog of Windows PowerShell team</a></p>
<p>I&#8217;d also like to mention a hidden gem, <a href="http://www.microsoft.com/technet/scriptcenter/tools/logparser/default.mspx" rel="nofollow">LogParser</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pandu Rao</title>
		<link>http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-119719</link>
		<dc:creator>Pandu Rao</dc:creator>
		<pubDate>Sun, 13 Apr 2008 03:50:07 +0000</pubDate>
		<guid isPermaLink="false">http://polishlinux.org/apps/cli/cmdexe-for-linux-zealots/#comment-119719</guid>
		<description>While cmd.exe is useful, it lacks many things. For e.g:
readline keybindings
command line substitution
robust redirection capabilities
advanced terminal capabilities

I have written a set of articles on how Linux power users can get by in the windows world:
Advanced Cygwin:
http://ergo.rydlr.net/?p=4

PuttyCyg - The authentic console for Cygwin
http://ergo.rydlr.net/?p=3</description>
		<content:encoded><![CDATA[<p>While cmd.exe is useful, it lacks many things. For e.g:<br />
readline keybindings<br />
command line substitution<br />
robust redirection capabilities<br />
advanced terminal capabilities</p>
<p>I have written a set of articles on how Linux power users can get by in the windows world:<br />
Advanced Cygwin:<br />
<a href="http://ergo.rydlr.net/?p=4" rel="nofollow">http://ergo.rydlr.net/?p=4</a></p>
<p>PuttyCyg &#8211; The authentic console for Cygwin<br />
<a href="http://ergo.rydlr.net/?p=3" rel="nofollow">http://ergo.rydlr.net/?p=3</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

