3 ms·
There is almost zero difference functionally or appearance-wise between my Cygwin shell (running in Console2) and my work Linux shell. Linux is much faster, pr
by barrkel 14y ago
There is almost zero difference functionally or appearance-wise between my Cygwin shell (running in Console2) and my work Linux shell.
Linux is much faster, primarily down to how reliant the Unix way is on forking and how much work Cygwin need to do to emulate that on Windows, but it's only noticeable when working with a lot of data that spawns O(n) processes.
Such scripts can often be rewritten as shell pipelines that don't scale in the same way. E.g. instead of running grep once per file, do xargs grep and filter by filename prefix if necessary; or instead of running mv once per file for renaming multiple files, convert to equivalent CMD syntax and output to a temporary batch file, and run the batch file.
I've got a number of scripts like these, implemented once for the Unix way, and again for Cygwin. But they don't come up all that often, and I haven't had to write one in years.