Web lists-archives.com

[Mingw-msys] libtool-1.5.20 can be used in mingw




Hi,

On Sun, 26 Jul 2009, leledumbo wrote:

> 
> Try running this buggy script:
> 
> for fin in `ls`; do
>   # notice the missing backtick (`)
>   fout=echo $fin | sed 's/\..*//'
> done
> 
> And (quickly) open task manager, you'll see a lot (and growing) of sh.exe
> processes.

This is really a PEBCAK: "fout=echo $fin" is a valid invocation of $fin 
with the environment variable "fout" set to the value "echo".

I am pretty certain that your "ls" returns a couple of shell scripts, and 
they are executed.

Now, why the number is growing, I can only guess that the forks are the 
issue (the sh.exe processes executing $fin not dying as quickly as the 
sed calls return), but that is pretty normal, given what you asked shell 
to do.

Ciao,
Dscho


------------------------------------------------------------------------------
_______________________________________________
Mingw-msys mailing list
Mingw-msys@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/mingw-msys