How to execute unix grep command from Peoplecode?
I need to execute a unix grep command from Peoplecode to find a text string within all SQRs. Since grep returns to the console, I pipe it to a text file and the read that file. However, it doesn't work. No file is created to read. This is my code:
&FilePath = "/apps/products/psoft/devdb/sqr/";
&strCmd = "grep -i -l " | &str | " " | &FilePath | "*.sq* > /apps/products/psoft/devdb/sqr/mfind.txt";
&exitcode = Exec(&strCmd, %Exec_Asynchronous + %FilePath_Absolute);
The sqr directory is open as 755. Any ideas?