-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I realized I could move back to J601 and test the lab I'm developing
that uses task.ijs and then come back to J602 when task is updated.  

It doesn't quite work as I had hoped, though.

,----
|    bash 'time mod "', jpath '~Labs/mcsimbasic/sir.model"'
`----

runs a program that compiles a text file (sir.model) into a C program.
That works, but it puts the C program (called model.c) into "/home/bill
harris" using Cygwin's definition of /home.  I verified that with 

,----
|    bash'pwd'
| /home/bill harris
`----

and with then finding model.c there.

The next step seemed easy enough; I should just change current directory
before running mod.  Two problems arise:

First, 

,----
|    bash 'cd "', jpath '~Labs/mcsimbasic/"'
| /usr/bin/bash: line 1: unexpected EOF while looking for matching `"'
| /usr/bin/bash: line 2: syntax error: unexpected end of file
`----

IOW, the same quoting I used to run mod doesn't seem to work when I run
cd.  What am I missing?

Incidentally,

,----
|     'cd "', jpath '~Labs/mcsimbasic/"'
| cd "c:\Documents and Settings\Bill Harris\j602-user\labs\mcsimbasic\"
|    +/ 32 = a. i. 'cd "', jpath '~Labs/mcsimbasic/"'
| 4
`----

so I gather the white space is all true spaces.

Second, 

,----
|    bash'pwd'
| /home/bill harris
| 
|    bash 'cd .. ; pwd'
| /home
| 
|    bash'pwd'
| /home/bill harris
`----

In other words, repeated calls to bash open and then close instances of
the shell.  I understand why; I'm just looking for an easy way to create
the effect of a persistent environment.  I thought defining a string of
commands might work:

,----
|    cmd=: 'cd .. ',: 'pwd'
|    bash cmd
| 
|    cmd
| cd .. 
| pwd   
`----

As you can see, that produced nothing.  

,----
|    cmd=: 'cd .. ',LF, 'pwd'
|    bash cmd
| /home
`----

works, though.  

Of course, 

,----
|    bash'cd .. && pwd'
| /home
`----

works, too, but, for long lists of commands, it could extend pretty far
out to the right.

Is there a good way to approach this sort of problem?  I'll be doing
this same thing multiple times in my lab.

,----
|    9!:14 ''
| j601/2006-11-17/17:05
`----

Thanks,

Bill
- -- 
Bill Harris                      http://facilitatedsystems.com/weblog/
Facilitated Systems                              Everett, WA 98208 USA
http://facilitatedsystems.com/                  phone: +1 425 337-5541
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: For more information, see http://www.gnupg.org

iD8DBQFH69WC3J3HaQTDvd8RAi5qAJ9slbkkjumB/acyO2CZjtoSDvvpQwCdG4oz
O+5EsVQ1Y45UPABnv1e/Avc=
=iOC6
-----END PGP SIGNATURE-----
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to