delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/08/04/22:34:24

From: simao AT ctd DOT comsat DOT com (Simao Campos)
Subject: Problem with nested command substitution
4 Aug 1998 22:34:24 -0700 :
Message-ID: <E0z3nMR-0000J7-00.cygnus.gnu-win32@iris.ctd.comsat.com>
Mime-Version: 1.0 (generated by tm-edit 7.108)
To: gnu-win32 AT cygnus DOT com
Cc: simao AT ctd DOT comsat DOT com

Hi,

I am new to the list, so please forgive me if I am asking about the
obvious... 

The problem I have is when I try to execute something like

  for f in *.txt; do x=`basename $f .txt`; mv $f $x.dat; done

I get an error from Win95 (the famous illegal operation window) where
it claims that Sh has caused an invalid page fault in module
KERNEL32.DLL at 0137:bff782b8, and dumps the registers.
In the example, I will get the error for as many .txt files there are
in the directory.

Interestingly enough, if I run the command that was in the nested
invokation alone, first, as in:

  basename --version > /dev/null
  for f in *.txt; do x=`basename $f .txt`; mv $f $x.dat; done

NO errors occur.

Can someone help me in finding what may be wrong?

Thanks,
Simao Campos
COMSAT Labs

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019