hi all
by using cat /etc/passwd
I've got these output.
ajh1ect:x:839:501:Anthony:/home/ajh1ect:/bin/bash
mjb1ect:x:840:501:Michael:/home/mjb1ect:/bin/bash
mv3ect:x:841:501:Marian:/home/mv3ect:/bin/bash
now I want to see just the user ID and group ID.
so what is the code will be with... (2 Replies)
I met a problem in using grep -P.
There is a text file, temp.txt, whose content is:
dddd
abc
I ran the command:
grep -P "\s*abc" temp.txt
The result I expected is:
abc
But, the actual result is:
dddd
abc
Could anyone tell me what is wrong?
Thanks. (2 Replies)
I have two .txt files one called good.txt and the other one is called bad.txt. Both contain email addresses in the following format:
john@john.com
bob@bob.com
sarah@sarah.com
Basically, I want to scrub good.txt against bad.txt and save the resulting output in scrubbed.txt meaning that if... (2 Replies)
------------------------------------------------------------------
Ex of Warning messgae,(Many similar lines occure for Both Test and Test1)
-WARNING:Below Field not implemented in file File name: /home/test/
new/file1, msg buffer is:
:Test:000948
... (1 Reply)
Hi All,
I have a huge file, I need to two things from this file. I need to know the IP address or the hostname and second thing is the date&time.
The file looks like this and I need to get my data from this...
Trying...
Connected to 204.109.172.117.
Escape character is '^]'.
Fri... (4 Replies)
thanks for your reply.
but i'm not quite sure what your code is doing.
i may be using it wrong but i'm not getting what i'm supposed to get.
could you please elaborate?
thanks again, (6 Replies)
Thread1 {
x = 2
y = 10485
}
Thread2 {
x = 16
y = 1048
}
Thread3 {
x = 1
y = 1049
}
Thread4 {
x = 4
y = 1047
z = 500
}
Suppose the above is a piece of code. I need to automate and verify that the value of x under Thread1's 2.
There are several... (3 Replies)
Hi everyone,
I've got a problem with converting C comments ( /* */ ) into C++ style ( // ) in some source file with sed. So far I've dealt with comments on one line, but I don't know how to convert when it is over multiple lines ...
So I already have something like this:
comments.sed
... (8 Replies)
Discussion started by: kolage
8 Replies
LEARN ABOUT PHP
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)