Search Results

Search: Posts Made By: dbchud
1,496
Posted By Franklin52
With an example of your input file I get this...
With an example of your input file I get this output:

$ cat file
Other line
Other line
Other line
SQL> update <table1> set <value1> = '*****';
update <table1> set <value1> = '*****'
*...
1,496
Posted By bash-o-logist
#!/bin/bash #tested with bash 4 ...
#!/bin/bash
#tested with bash 4

content=$(<file)
while [[ $content =~ Elapsed ]]
do
c=${content#*Elapsed}
case "${content%%Elapsed*}" in
*SQL*ERROR*)
echo...
1,496
Posted By Franklin52
Try: awk '/^SQL/{s=$0;next}{s=s RS $0}...
Try:
awk '/^SQL/{s=$0;next}{s=s RS $0} /^ERROR/{f=1} f && /^Elapsed/{print s; f=0}' file
15,217
Posted By Corona688
I don't think the cd will stop it from working. ...
I don't think the cd will stop it from working.

The export won't hurt it, but I don't think it's doing what you wanted either. If ORACLE_HOME wasn't set to anything, exporting it won't figure out...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 09:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy