Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to grep cells that contain a specific string? Post 302606114 by evelibertine on Friday 9th of March 2012 02:49:18 PM
Old 03-09-2012
How to grep cells that contain a specific string?

How do you grep cells that contain a specific string. I tried grep but it greps the whole line and not just the cells. Thanks!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep - searching for a specific string

ppl, this is my "file" with fields orderno orderdate orderdesc telno street city 1 01/04/2006 abc 123 100 tampa 2 01/04/2006 abc 123 100 tampa 3 01/04/2006 abc 123 100 tampa 4 01/04/2006 abc ... (2 Replies)
Discussion started by: manthasirisha
2 Replies

2. UNIX for Dummies Questions & Answers

Deleting cells that contain a specific number only from a space delimited text file

I have this space delimited large text file with more than 1,000,000+ columns and about 100 rows. I want to delete all the cells that consist of just 2 (leave 2's that are not by themselves intact): File before modification aa bb cc 2 NA100 dd aa b1 c2 2 NA102 de File after modification... (1 Reply)
Discussion started by: evelibertine
1 Replies

3. Programming

How to grep the specific string or user's list from the file

I have a file on UNIX system from where I want to grep the list of all users associated to the particular repository.If the user's list is in single line then I fetch all list but if it is in two separate lines it doesn't.I use the below command a=KESTREL-DEV;b=users;cat access_file|grep... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies

4. UNIX Desktop Questions & Answers

Using grep to remove cells instead of lines

I would like to use grep to remove certain strings from a text file but I can't use the grep -v option because it removes the whole line that includes the string whereas I just want to remove the string. How do I go about doing that? My input file: Magmas CEU rs12542019 CPNE1 RBM12 CEU... (1 Reply)
Discussion started by: evelibertine
1 Replies

5. UNIX for Dummies Questions & Answers

Using grep to remove cells instead of whole lines

I would like to use grep to remove certain strings from a text file but I can't use the grep -v option because it removes the whole line that includes the string whereas I just want to remove the string. How do I go about doing that? My input file: Magmas CEU rs12542019 CPNE1 RBM12 CEU... (2 Replies)
Discussion started by: evelibertine
2 Replies

6. UNIX for Dummies Questions & Answers

Grep Specific String In CSV

Hi All, I have a csv file like the following: "ABCD2","EFGH2","XXXX","1" "ABCD2","EFGH2","XXXX","2" I want to grep out the row which contains the value of 2 within the 4th column, so then i can use the extracted record to cut up and store into numerous variables. Obviously when... (3 Replies)
Discussion started by: RichZR
3 Replies

7. UNIX for Dummies Questions & Answers

Replacing all cells that have a specific value in a text file

I have a space delimited text file where I want to replace all cells that are 0 with NA. However I cannot simply use 'sed/0/NA/g' because there are other 0's in the text file that are part of numbers. Example input: 896.933464285715 0 874.691732142857 866.404660714286 Output:... (1 Reply)
Discussion started by: evelibertine
1 Replies

8. UNIX for Dummies Questions & Answers

Grep contains specific string

i have file input dsgfdgdfgd> cab |egrep -i '(active|cbu)' 130502-11:34:11 10.133.1.153 9.0j stopfile=/tmp/15959 Trying password from ipdatabase file: /opt/ericsson/amos/moshell/sitefiles/ipdatabase... .. 0 1 CBU1 OFF ON 16HZ ROJ1192209/1 R5E TU8BZ04466... (3 Replies)
Discussion started by: radius
3 Replies

9. Shell Programming and Scripting

Grep and neglect a specific string

Hi, I have a file with "n" number of lines. I need to get rid of a specific line having a specific string from the file. I tried some possibilities but not successful. For ex: in a file named "test" hope should be removed along with the line. ... (8 Replies)
Discussion started by: ricky-row
8 Replies

10. Shell Programming and Scripting

Grep only words containing specific string

Hello, I have two files. All urls are space seperated. source http://xx.yy.zz http://df.ss.sd.xz http://09.09.090.01 http://11.22.33 http://canada.xx.yy http://01.02.03.04 http://33.44.55 http://98.87.76.65 http://russia.xx.zz http://aa.tt.xx.zz http://1w.2e.3r.4t http://china.rr.tt ... (4 Replies)
Discussion started by: baris35
4 Replies
ZGREP(1)                                                      General Commands Manual                                                     ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 05:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy