Mail Archives: cygwin/1998/04/27/23:37:56
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 AT cygnus DOT com" with one line of text: "help".
- Raw text -