Has anyone succeeded in making bodi exec() function to handle piping properly?
easy example:
“ls -l | grep bodi” should list all entries of the current directory (on jobserver) containig “bodi” e.g. as the owner.
The users-manual recommends to use a shell to do this. So on unix (sun os)
it should look like:
exec(‘sh’,‘-c 'ls -l | grep bodi'’,8 )
but the piping seems to be either ignored or leads to an error
I use di 6.5.1.10 and i think i reported this to the customer support for 6.0 already.
The workaround to put it in a shellscript still helps, but it is inconvenient and not very elegant at all.
Is this still a bug to be fixed or can i put the parameters in a correct order to make this work?
Hi folks,
thank you for your answers, but i am looking for a way to do the trick without a shellscript. If i read the manual there is an example for windows and there is also a note that says if i want to use piping, i must point to a shell (like sh) in the first exec() parameter - which i did. (Without positive effect )
Does this work on windows at least?
Is this a bug or should the “feature” be removed from the manual or am i still missing something
@ shamit: Your solution is a little more flexible than writing a script for any kind of problem - i guess i’ll try that for a better workaround (but it’s still a workaround, isn’t it? )