All,

I'm trying to write a KSH script using sed (I'm very new to ksh) that pulls this SQL query from a log, but I want it to ignore the time stamp and the six characters/spaces that follow it. Here's the code that I have so far...

```
cat file.log \
| sed -n '/---Query1/,/selected/p' \
| sed 's/^([0-9][0-9]:[0-9][0-9]:[0-9][0-9]??????)//g' \    # My problem
> newfile.log

===Input===

11:23:34 SQL> ---Query1    
11:23:34 SQL> select a.column1, b.column2, count(*)
11:23:34   2  from table1 a, table2 b
11:23:34   3  group by a.column1
11:23:34   4  order by 1, 2, 3;

a.column1   a.column2   count(*)
----------- ----------- ----------
foo         bar         32

1 row selected.

===Desired Output===

---Query1
select a.column1, b.column2, count(*)
from table1 a, table2 b
group by a.column1
order by 1, 2, 3;

a.column1   a.column2   count(*)
----------- ----------- ----------
foo         bar         32

1 row selected.

```

Any help you can offer is greatly appreciated.