The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to use sed modify specific lines Jenny.palmy UNIX for Dummies Questions & Answers 5 05-18-2008 07:17 AM
Printing Dots in specific Locations in the Console ? Max_Payne High Level Programming 0 01-13-2008 12:57 AM
Printing specified lines only Mohit623 Shell Programming and Scripting 4 01-03-2008 08:55 AM
viewing specific lines dakid UNIX for Dummies Questions & Answers 3 05-25-2006 04:25 AM
Inserting specific lines in vi giannicello UNIX for Dummies Questions & Answers 2 05-01-2002 09:10 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-13-2007
jehrome_rando jehrome_rando is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 6
Printing lines with specific awk NF

I have this files:
./frm/lf_mt1_cd.Ic_cell_template.attr
./die/addgen_tb_pumd.Ic_cell_template.attr
./min_m1_n.Ic_cell_template.attr

When I use:
awk -F\/ '{print NF}'

Would result to:
3
3
2

I would like to list the files with 3 fields on it. Any Suggestions?
  #2 (permalink)  
Old 03-13-2007
ranj@chn ranj@chn is offline Forum Advisor  
Playing with Ubuntu Now!
  
 

Join Date: Oct 2005
Location: Chennai
Posts: 365
Explanation required

Just use

Code:
awk -F\/ 'NF == 3' filename

Please format what you type using the tags available. It will be more readable.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:05 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0