The problem you're running into is because "2>/dev/null" is not a valid
argument for the "find" command. Try instead:
[exec /bin/bash -c "find ${WAS_DIR} -name ws_runtime.jar -print
2>/dev/null"]
From: Ranga Raju C.V.S. [mailto:ran...@gm...]
Sent: Friday, September 18, 2009 1:45 PM
To: tcl...@li...
Subject: [tcljava-user] exec command failing in Jacl
Hello folks,
My intention is to do the below two steps but Jacl is failing:
set WAS_DIR "/usr/WebSphere/DeploymentManager_lb04"
set testPath [exec find ${WAS_DIR} -name ws_runtime.jar -print
2>/dev/null]
Please correct me where I may be going wrong.
There are certain sub-directories to which the user does not have
permissions to read. But ws_runtime.jar is in a location to which the
user has permission to. So to avoid "Permission Denied" messages I am
using 2>/dev/null in that command. But Jacl does not seem to like it.
The find command works perfectly when I run it directly on AIX box as
shown below:
$ find $WAS_DIR -name ws_runtime.jar -print 2>/dev/null
/usr/WebSphere/DeploymentManager_lb04/deploytool/itp/plugins/com.ibm.web
sphere.v61_6.1.200/ws_runtime.jar
$
But the same in Jacl it throws the following exception:
wsadmin>exec find $WAS_DIR -name ws_runtime.jar -print 2>/dev/null
WASX7015E: Exception running command: "exec find $WAS_DIR -name
ws_runtime.jar -print 2>/dev/null"; exception information:
com.ibm.bsf.BSFException: error while eval'ing Jacl expression:
find: missing conjunction
while executing
"exec find $WAS_DIR -name ws_runtime.jar -print 2>/dev/null"
wsadmin>
Can someone assist here please ?
--
Regards & Best Wishes,
Ranga Raju...
|