I have a simple shell script to read file line by line, use grep | grep command to find if matched. And output to a new File.
The script works fine in command window.
However, When I try to call this script in Oracle Form with host(script,no_screen) command, the result is not what I expected. grep | grep not get expected result(works fine when manually execute in cmd window). cp -f and rm command not working neither.
It seems only IFS=read and echo ${line} >> ${file} works fine.
Wish someoen can give me advise. Thx
Tried using different way to test grep | grep result, all worked fine when manually execute, but failed by using host().
expect get correct result, output to temp file, replace readFile and remove temp file.
Currently, cant get expected grep result, all goes to else branch, and did not replace read file,not removing temp file
Fan Li nidafg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.