PeopleTools and Lifecycle Management - PSFT (MOSC)

MOSC Banner

How to execute unix grep command from Peoplecode?

edited Aug 18, 2016 5:00AM in PeopleTools and Lifecycle Management - PSFT (MOSC) 10 commentsAnswered

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?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center