Author Topic: [ solved ] Extracting lines from a text file (CUPS error log)  (Read 171 times)

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2436
  • Any Bugs in site?
[ solved ] Extracting lines from a text file (CUPS error log)
« on: September 04, 2012, 06:17:24 AM »
I have an 8000 line plus file and would like to extract all lines containing recurring pattern, which can be almost anywhere in the lines.

As my brain is focused on the internals of CUPS and Ghostscript I don't seem to be able to get out of this mode in hurry. Bit of guidance to re-boot my brains  ;D

For example I would like to extract all lines containing  [Job 3]   :-[
« Last Edit: September 05, 2012, 08:21:11 AM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2436
  • Any Bugs in site?
Re: Extracting lines from a text file (CUPS error log)
« Reply #1 on: September 05, 2012, 06:40:41 AM »
TBercaht
Thank you just what I needed it was the \[ etc that caused me trouble, I just could not think, and it is getting worse. 

I have analysed thousands of lines from the cups error log. Seems to me that that pstops conversion is going weird, but the goalpost has just changed.  Anyway I should not report this here as I have just remembered ti is the KDE64-test05 I am running most of the time.   ;D
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen