Author |
Message
|
wbisantosh |
Posted: Tue Apr 29, 2014 6:12 am Post subject: Asterisk to JobExecution Node |
|
|
Apprentice
Joined: 12 Nov 2012 Posts: 47
|
Hello Experts,
I am trying to implement an Application which does command line interaction with the Linux Server(zLinux) and I am using Jo Execution Node for this purpose.
I am stuck at one point where I need to search for the FileNames that contain a string( Example - searching for A will result in A.xml,A1.xml etc)
While I send Asterisk(*) in the command OS is taking it as character and not showing me the actual results, but when I try with the same Command on my commandline it works. Is it possible to pass * to the JobExecution Node ?
Command used - find / -name "*A*"
Environment - WMB 8.0.0.3
OS -zLinux
Help is much appreciated
Thanks Santosh |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Apr 29, 2014 7:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Did you try escaping the '*' ex '\*A\*' ?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
wbisantosh |
Posted: Wed Apr 30, 2014 6:48 am Post subject: |
|
|
Apprentice
Joined: 12 Nov 2012 Posts: 47
|
No Luck
I also tried defining the asterisk in HEX ( '0X2A' ) and then appending to the char but it doesnot work either |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Apr 30, 2014 7:02 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
wbisantosh wrote: |
No Luck
I also tried defining the asterisk in HEX ( '0X2A' ) and then appending to the char but it doesnot work either |
You might have to escape the \ as well : "\\*A\\*"  _________________ MQ & Broker admin |
|
Back to top |
|
 |
wbisantosh |
Posted: Wed Apr 30, 2014 10:27 am Post subject: |
|
|
Apprentice
Joined: 12 Nov 2012 Posts: 47
|
Still no luck.
I found another way to search - ls -l | grep A
Even with this approach, It is considering'|' as a character and giving me errors -
Quote: |
<error>ls: cannot access |: No such file or directory
ls: cannot access grep: No such file or directory
ls: cannot access 497370: No such file or directory
</error> |
I also tried | with Escape but still the same. Not sure how to continue  |
|
Back to top |
|
 |
McueMart |
Posted: Thu May 01, 2014 7:35 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
How about using a JCN with Runtime.exec() instead of the Job Execution Node? I have never really looked exactly what the supportpac can do, but I expect you could do everything you wanted (and more...) in java. |
|
Back to top |
|
 |
wbisantosh |
Posted: Thu May 01, 2014 1:12 pm Post subject: |
|
|
Apprentice
Joined: 12 Nov 2012 Posts: 47
|
Awesome. Thanks for your Idea! Appreciate it.
Tested, and working good.
I've got my hands on in JCN too now  |
|
Back to top |
|
 |
|