Subject: 19.1 bash access violation
From: [email-masked] (Ray Fergerson)

27 Apr 1998 23:37:56 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: [email-masked]

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
"[email-masked]" with one line of text: "help".