Hi team,I am getting below error while running command from go
fork/exec awk ‘BEGIN{buf=""} /[0-9]:[0-9][0-9]:[0-9]/{buf=$0};/ORA-/{print buf,$0}’ /u02/app/oracle/admin/12.1.0.2/diag/rdbms/*******/******1/trace/alert_******1.log: no such file or directory
When I am trying to run it manually it’s running fine:
[oracle@cfcldx0139 adhoc]$ exec awk ‘BEGIN{buf=""} /[0-9]:[0-9][0-9]:[0-9]/{buf=$0};/ORA-/{print buf,$0}’ /u02/app/oracle/admin/12.1.0.2/diag/rdbms/*******/*******1/trace/alert_*****1.log
Fri Jul 10 08:03:10 2020 ORA-65000 signalled during: ALTER pluggable DATABASE CLOSE immediate…
code below
search_cmd := “awk 'BEGIN{buf=”"} /[0-9]:[0-9][0-9]:[0-9]/{buf=$0};/ORA-/{print buf,$0}’ " + alert_file
cmd2 := exec.Command(search_cmd)