[mdlug] how would you teach a class?

Aaron Kulkis akulkis00 at gmail.com
Thu Jul 9 03:14:28 EDT 2009


Drew wrote:
> At 10:33 PM 7/8/09, Aaron Kulkis wrote:
> 
>> Teach the basic commands (cd, ls, cat/more/less)...
>> and then IMMEDIATELY introduce the pipe mechanism
>> before teaching anything else.
>>
>> Why?
>>
>> Because once you have someone hooked on the flexibility
>> of using command pipelines, they'll never want to go back
>> to Windows ;-)
> 
>      Pipes are nice, but Windows also has command line capability, including
> pipes, and including input /output redirect, for those who know where to look.
> I just verified this by executing "dir | more", "dir > 
> d:\dir_test.txt", and "type
> d:\dir_test.txt".

But windows implements pipes in properly

in Unix

cmd1 | cmd2 | cmd3

can produce output immediately, while cmd1 continues indefinitely.

In Windows

cmd1 | cmd2 | cmd3 is just shorthand for:

cmd1 > temp1 ; cmd2 < tmp1 > tmp2 ; rm tmp1 ; cmd3 < tmp2 ; rm tmp2

The two are similar but not at all equivalent.



More information about the mdlug mailing list