Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

searching for a specific Pattern 1

Status
Not open for further replies.

UCF87

Technical User
Feb 13, 2003
44
0
0
US
I have the following input:

AAAA011
BBBB022
CCCC
EEEE222
FFFFF333
~

I want to create an exception report to find CCCC, without knowing what CCCC is.

I have tried:
awk '{if($1~/.... */) print $0}' input > output

Thank you in advance
 
let me see: you want to find something you don't know what it is? That's a bit more chanllenging than awk can handle! :)

Do you want to get lines with characters ONLY maybe?
Pls provide sample input and sample output.

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Try this:
Code:
awk '/^....    */' input > output

Hope This Help
PH.
 
The ^ for begining of line still does not capture and print CCCC only. Maybe AWK does not work well with spaces?
I want the output to show all occurrences of any lines without numbers.


 
nawk '!/[0-9]+/'

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Thank you! That worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top