05-10-2011
WOW ... Franklin52 your grep statement worked like a charm ... I had no idea grep could be used this way!
Thank you!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file which has some lines starting with a particular word. I would like to delete 5 lines before each such line containing that particular word.
eg:
line1
line2
line3
line4
line5
line6
"particular word"...
I would like to delete line2-line6 and all such occurences in that... (4 Replies)
Discussion started by: ramu_1980
4 Replies
2. Shell Programming and Scripting
Hi,
I'am working under unix solaris
I have a text file with set of lines, each set of lines (BLOCK) have
three fixed lines :
Between SECND line and THEND we have N lines, N differ from a block to another
sample :
i have to make a script wich delete each 3 fixed lines if N=0... (3 Replies)
Discussion started by: salbanito
3 Replies
3. Shell Programming and Scripting
Hello, I have a file like this one:
03-07-2011 sunz02 message1
03-07-2011 sunz02 message2
03-07-2011 sunz02 message3
01-07-2011 sunz02 message1
01-07-2011 sunz02 message2
01-07-2011 sunz02 ... (1 Reply)
Discussion started by: asanchez
1 Replies
4. Shell Programming and Scripting
Hello, I have a file like:
26-07-2011 sunz02 message1
26-07-2011 sunz02 message2
26-07-2011 sunz02 message3
15-07-2011 sunz02 message1
15-07-2011 sunz02 message2
15-07-2011 sunz02 message3... (5 Replies)
Discussion started by: asanchez
5 Replies
5. Shell Programming and Scripting
Hello,
I have a file filled with dates, such as:
04-08-2011 message
04-08-2011 message
03-08-2011 message
01-08-2011 message
31-07-2011 message
24-07-2011 message
15-07-2011 message
13-12-2008 message
26-11-2007 message
And I want to delete those lines whose date is older than 10... (5 Replies)
Discussion started by: asanchez
5 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a space delimited text file that looks like the following:
250 rs10000056 0.04 0.0888 4 189321617
250 rs10000062 0.05 0.0435 4 5254744
250 rs10000064 0.02 0.2403 4 127809621
250 rs10000068 0.01 NA
250 rs1000007 0.00 0.9531 2 237752054
250 rs10000081 0.03 0.1400 4 17348363... (5 Replies)
Discussion started by: evelibertine
5 Replies
7. Shell Programming and Scripting
I have a big file having 100 K lines.
I have to read each line and see at 356 character position whethere there is a word "W" in it. If it is their then don't delete the line otherwise delete it.
There are two lines as one Header and one trailer which should remain same.
Can somebody... (5 Replies)
Discussion started by: mohit kanoongo
5 Replies
8. Shell Programming and Scripting
Hi,
I have a file with 20 columns of data and hundreds of lines of the same format.
Here is an example line. The data repeats underneath with the same format.
15 1 4 GLY - 1 65 LYSH 23 N - 24 H - 634 O 0.188 157.552 487 48.70I have been sorting this data by hand but I was wondering if I... (3 Replies)
Discussion started by: livbaddeley
3 Replies
9. Shell Programming and Scripting
I'm trying to create a script.
There are 2 files - fileA.log & fileB.log
fileA.log has the below data :
aaaa
cccc
eeee
fileB.log has the below data :
cjahdskjah aaaa xyz
jhaskjdhas bbbb abc
ajdhjkh cccc abc
cjahdskjah ... (7 Replies)
Discussion started by: Pandee
7 Replies
10. Shell Programming and Scripting
Hi,
I'm trying to search for some number and from that line, i need to delete the 5th line exactly.
Eg:
Consider below as text file data:
10000
a
b
c
d
e
.
.
.
10000
w
q
t (8 Replies)
Discussion started by: Gautham
8 Replies
LEARN ABOUT XFREE86
zgrep
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)