Hi,
I have a script that my operators use as a login profile.
As they need to export their display in order to access the GUI of the data protector program in HPUX machine.
Anyone can advise how I can grep (eg. who -r) the dynamically assigned IP address and automatically put it as a variable... (4 Replies)
I'm looking a Grep or egrep statement that would allow me to exclude the a range of ip address via the last octet
example egrep -v "*.*.*.(54|61)" from a syslog file.... would this work? (6 Replies)
I need to find out whether a line in a text file contains an ip address or a hostname. How can I do this? For example:
123.2.34.55
host1
host2.domain.com
host3.intra.domain.com
Then I want as result a list with ip addresses and hostnames. (2 Replies)
hi,
Pls advice me, how to grep only the ip address from the following output:
<ip>10.4.65.67</ip>
<TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA>false</TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA>
<TLS_RSA_EXPORT1024_WITH_RC4_56_SHA>false</TLS_RSA_EXPORT1024_WITH_RC4_56_SHA>
<ip>10.4.65.67</ip>... (6 Replies)
Hi
I have downloaded a HTM file from the web.
What I want to do is perform a grep search of that file, searching for all strings where 'http' is present within the file, but only contains the word 'cache' within the string.
I've includeda sample file, which I'm trying to extract the above... (5 Replies)
I have a file
$ cat ip12
11.22.33.44
192.68.1.2
helo
l
72.34.34.200
333.444.555.666
12.23e.544.423
myip1 11.22.33.44
myip2 33.44.55.66 #fine this IP should also be listed
I do
$ cat ip12 | grep '^\{1,3\}\.\{1,3\}\.\{1,3\}\.\{1,3\}$'
11.22.33.44
192.68.1.2 (2 Replies)
I have a file with a lot of IP addresses in it named "address.list".
address.list looks something like this:
10.77.50.11
10.77.50.110
10.77.50.111
a bunch more addresses
For every IP address I need to grep another file to see if the IP address is in the other file:
for x in `cat... (5 Replies)
I have an input file:
class 1 3 5 10.10.10..0/23 hicks jimmy
class 3 10.12.10.0/22 mike
class.019283 10.10.15.10/20 henry
gym.847585 45 192.168.10.0/22 nancy jim steve maya
The output should look like this:
10.10.10..0/23
10.12.10.0/22
10.10.15.10/20
192.168.10.0/22
I have the... (3 Replies)
Hi,
mac.txt
My mac address is <Mac Address>.
How can i replace <Mac Address> with the actual of my computer?
I try to GREP command as below but i am unable to grep it to replace just <Mac Address>.
ifconfig eth0 | grep -o -E '(]{1,2}:){5}]{1,2}'
Million in Advance.
Please use... (7 Replies)
I have a file "file1" that contains several ip address , and the "file2" contains several records , each line in file2 contains somewhere the ip address that i am searching in the file1
I use the unix command grep -w
for i in `cat file1`
do
grep -w "$i" file2 >> file3
done
... (9 Replies)
Discussion started by: knijjar
9 Replies
LEARN ABOUT POSIX
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)