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
selecting rows with specific IDs for downstream analysis labrazil High Level Programming 2 10-01-2008 04:59 AM
command for selecting specific lines from a script gardasgangadhar UNIX for Dummies Questions & Answers 1 05-13-2008 06:29 AM
Help with selecting specific lines in a large file tansha UNIX for Dummies Questions & Answers 2 02-06-2008 08:26 AM
Urgent: selecting unique specific content of a file using shell script jisha Shell Programming and Scripting 2 01-08-2008 08:45 AM
Selecting records from file on criteria. videsh77 Shell Programming and Scripting 7 12-29-2004 02:20 PM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-19-2009
phil_heath phil_heath is offline
Registered User
  
 

Join Date: May 2009
Posts: 55
Selecting rows with a specific criteria

Hi,

I want a UNIX command that can filter out rows with certain criteria.
The file is tab deliminated. Row one is just a value. Basically what I want to do is select based on the name and character at the end (o). So lets lets say i want a row that has WashU and (o) then it would print into another file. Another thing is that the rows vary in size. Is this possible?

eg of the file:

Code:
YCR069W	 MIT_Spar_c89_2669 (o)  MIT_Smik_c1224_1803 (p)   MIT_Sbay_c91_2895 (o)   WashU_Scas_Contig720.92 (o)  
YCR071C	 MIT_Spar_c89_2672 (o)  MIT_Smik_c1224_1802 (o)   MIT_Sbay_c91_2899 (p)   WashU_Scas_Contig720.93 (p)   WashU_Skud_Contig1012.1 (o)  WashU_Sklu_Contig2173.3 (o)
So basically I want to select rows that have WashU at the start and (o) behind it.

Thanks

Phil

Last edited by vgersh99; 07-19-2009 at 07:04 PM.. Reason: code tags, PLEASE!
 

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 07:53 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