Again Substring!!!! Help

Hi,

To remove the date and time from the below data which is in a file abc.txt

29 Jul 2009 04:36:53,956 [ajp-0.0.0.0-8310-140] ERROR 1
Error with Java
29 Jul 2009 04:36:58,335 [ajp-0.0.0.0-8310-239] ERROR 2
29 Jul 2009 05:37:24,746 [ajp-0.0.0.0-8310-125] ERROR 3

I want the output as

ERROR 1
Error with Java
ERROR 2
ERROR 3

As, In the above data time have different seconds . I am not getting how to do that .

Kindly let me know how to do the same.

awk '{ pos=instr($0, " E"); if(pos) {pos++; $0=substr($0,pos) }; print $0}' filename

A bit modification to your earlier post's answer :

sed 's/\(.*]\)//'  input_file

Jim , I hope your's is good as wherever the "Error" is , it will return :slight_smile: