10-18-2014
Really helpful mate, thanks a lot
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
My boss wants me to find out how often e-m users are accessing their account:confused:. The mail server keeps log of all logins. I want to use grep the 'usernames', but it should come out the moment it first encounters the username in the log. Can I do that? I want to avoid 10+ greps... (2 Replies)
Discussion started by: nitin
2 Replies
2. UNIX for Dummies Questions & Answers
I have the data file:
A
1
2
3
BBB
4
5
6
A
7
8
9
I want to grep "A" then-skip a line-then-add two sublines:
I my command:
grep +3 "A" datafile (8 Replies)
Discussion started by: bobo
8 Replies
3. UNIX for Dummies Questions & Answers
Hi,
Is it possible to display a specific number of lines starting from a line having a particular text using grep command?
e.g. I have a text file with the contents below:
AAA
BBB
CCC
DDD
EEE
FFF
I want to display 3 lines starting with the line having "BBB" to get the result below:... (11 Replies)
Discussion started by: stevefox
11 Replies
4. UNIX for Dummies Questions & Answers
Hello All,
1.)
I am searching for ".exe" in a text file
2.)
I need to search for a hexadecimal entree of at least four digits (8 Replies)
Discussion started by: Omega1589
8 Replies
5. Shell Programming and Scripting
Hello All,
I have few of questions related to Grep given below:
1. Like Perl, is it possible in Grep to negate characters in square brackets. For example in Perl, if '^' is used inside '' then it acts as a negation characters. Can same be achieved through Grep's regular expression.
2. How... (9 Replies)
Discussion started by: paragkalra
9 Replies
6. Shell Programming and Scripting
can someone help me in the awk part...little confuse on that part.
The problem is this: what input each utility gets and what it does with data and what output is provides to the next utility)
history | awk '{a++}END{for(i in a){print a " " i}}' | sort -rn | grep '^'
Thanks (4 Replies)
Discussion started by: Learnerabc
4 Replies
7. Shell Programming and Scripting
Hi guys. I need to filter some values from a number of log files. One of the files is:
Interconnect Utilisation Results:
Achieved Maximum Number of Concurrent Connections: 17
Statistics for Average Number of Concurrent Connections:
Point Estimation: Confidence Interval: ... (2 Replies)
Discussion started by: Faaz0
2 Replies
8. Shell Programming and Scripting
I have a file and need to only select users that have a shell of “/bin/bash” in the line using awk or sed please help (4 Replies)
Discussion started by: boyboy1212
4 Replies
9. UNIX for Dummies Questions & Answers
I have different things that I was trying to do but am kind of struggling with this since I'm a Linux noob. The backround is that I have two files with student names in the same directory, and each file lists the student name, their major and their grade level. What is the most efficient way to... (6 Replies)
Discussion started by: tastybeer
6 Replies
10. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
Please bare in mind I am a complete novice to this and have very very basic knowledge so please keep any answers as simple as possible and explain in terms I will understand ahha :):)
I have a text file of names and test scores... (1 Reply)
Discussion started by: jamesb18
1 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)