- 
    Enhancement 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    None
- 
        b66
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8085664 | emb-9 | Michael Haupt | P3 | Resolved | Fixed | team | 
| JDK-8087086 | 8u65 | Michael Haupt | P3 | Resolved | Fixed | b01 | 
| JDK-8080509 | 8u60 | Michael Haupt | P3 | Resolved | Fixed | b18 | 
| JDK-8138491 | emb-8u65 | Unassigned | P3 | Resolved | Fixed | b01 | 
| JDK-8086239 | emb-8u60 | Michael Haupt | P3 | Resolved | Fixed | team | 
In addition, the tokenizing behavior is overly simplistic. It would also be nice to have another command that passes a single string as the argument to sh -c. (Where "sh" would be replaced by the value of the SHELL environment variable.) This would allow for proper shell-style quoting and redirection.
===== CURRENT BEHAVIOR =====
sh-3.2$ ls
sh-3.2$ touch a 'b c'
sh-3.2$ ls -l
total 0
-rw-rw-r--+ 1 smarks smarks 0 Jul 3 14:59 a
-rw-rw-r--+ 1 smarks smarks 0 Jul 3 14:59 b c
sh-3.2$ jjs -scripting
jjs> $EXEC("ls -l")
total 0
-rw-rw-r--+ 1 smarks smarks 0 Jul 3 14:59 a
-rw-rw-r--+ 1 smarks smarks 0 Jul 3 14:59 b c
jjs> $EXEC("ls -l a")
-rw-rw-r--+ 1 smarks smarks 0 Jul 3 14:59 a
jjs> $EXEC("ls -l 'b c'")
jjs> $ERR
ls: 'b: No such file or directory
ls: c': No such file or directory
jjs> $EXEC("ls -l b\ c")
jjs> $ERR
ls: b: No such file or directory
ls: c: No such file or directory
===== DESIRED BEHAVIOR =====
jjs> $EXECV("ls", "-l", "a", "b c")
-rw-rw-r--+ 1 smarks smarks 0 Jul 3 14:59 a
-rw-rw-r--+ 1 smarks smarks 0 Jul 3 14:59 b c
jjs> $RUN("ls -l a 'b c' | wc")
2 19 96
=====
It doesn't have to be exactly the above, of course. Some means will need to be provided for passing data to stdin much like $EXEC does today.
- backported by
- 
                    JDK-8080509 jjs scripting: need way to quote $EXEC command arguments to protect spaces -           
- Resolved
 
-         
- 
                    JDK-8085664 jjs scripting: need way to quote $EXEC command arguments to protect spaces -           
- Resolved
 
-         
- 
                    JDK-8086239 jjs scripting: need way to quote $EXEC command arguments to protect spaces -           
- Resolved
 
-         
- 
                    JDK-8087086 jjs scripting: need way to quote $EXEC command arguments to protect spaces -           
- Resolved
 
-         
- 
                    JDK-8138491 jjs scripting: need way to quote $EXEC command arguments to protect spaces -           
- Resolved
 
-         
- relates to
- 
                    JDK-8080490 add $EXECV command to Nashorn scripting mode -           
- Resolved
 
-