19.1 bash access violation

Ray Fergerson fergerson@SMI.Stanford.EDU
Mon Apr 27 18:14:00 GMT 1998


I'm trying to run bash from the nt command shell and am getting an access
violation.  The command is

c:\projects> bash -c "echo $(cat foo.txt)"

I also get an access violation on

c:\projects> bash -c "echo $(foo)"

where foo does not exist.

Both of these commands produce the expected output if issued from bash itself.  

The above commands do nothing useful but are simply reduced version of my real
command that does accomplish something.  What I really want to do is to
increment a counter in a file.  The way I have come up with to do this is

echo $(($(cat myfile)+1)) > myfile

This works from bash but not when I pass it in as a command string.  Is there an
easier way to do this? 

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



More information about the Cygwin mailing list