I typed a command:
And I got file a.txt which show
Just now, I want to get exact ips which has first column > 5 to a file b.txt. In this situation, the result must have 1.1.1.1 in b.txt
I am trying to feed a list of IP's to do lookups from a database. My script works only for the first IP but all subsequent IPs output as 'unknown'.
#!/usr/bin/php -q
<?
$ip = file('ip.txt');
foreach ($ip as $ip_num => $ip) {
echo $ip;
$out=sprintf("%u", ip2long($ip));
... (1 Reply)
To add more than 500 ips Hi,
I have a server, which has more than of 1000 ip address, but only 500 ip address are responding in the Server. Here below the error message received while restarting the named
Code:
Sep 22 00:25:00 ns2 named: creating IPv4 interface... (2 Replies)
Hello to the unix.com community.
I have a mess of text. What I would like to do I pluck out IP addresses and CIDR notations only.
I thought I would try something like this
/usr/bin/grep -o '\{1,3\}\.\{1,3\}\.\{1,3\}\.\{1,3\}\\' /Path/To/File
But there are a few problems wit this.
... (3 Replies)
Hello,
I have a dump of IPs (around 2 million) and i need to filter out(delete) 37 IPs from this list.
Here is a short list of IPs that i would need deleted
111.111.xxx.xxx
123.123.xxx.xxx
127.x.x.x
98.20.xx.xxx
10.135.xxx.xxx
11.105.xxx.xx
100.100.xxx.xxx
101.xxx.xx.xxx
... (11 Replies)
hi,
i want to know how can i get my gateway ips in the network,what i want is the ip of my neighbors in subnet( computers that are directly connected to my computer via lan or wlan), how can i get these information?
thanks in advance. (2 Replies)
Hi experts,
I have an X86 as my IPS server running ( uname -a SunOS 5.11 11.1 i86pc i386 i86pc). the IPS has the following package version:
prdb01b:~# pkg list -fa entire
NAME (PUBLISHER) VERSION IFO
entire ... (0 Replies)
Hello again gentlemen.
I would like to make a shell script to 'optimize' a plain text full of IPs.
Let's suppose to have this text file:
1.192.63.253-1.192.63.253
1.0.234.46/32
1.1.128.0/17
1.116.0.0/14
1.177.1.157-1.177.1.157
1.23.22.19
1.192.61.0-1.192.61.99
8.6.6.6
I want to... (2 Replies)
Hello!
We have an AIX box (6.3), we are looking for a way to get list of logged in users and their IP. The issue we have is running who -ub shows hostname and we are wanting to get the ip. Any suggestions of ideas? Thanks in advance for any help! (4 Replies)
Discussion started by: entropy1980
4 Replies
LEARN ABOUT X11R4
uniq
UNIQ(1) User Commands UNIQ(1)NAME
uniq - report or omit repeated lines
SYNOPSIS
uniq [OPTION]... [INPUT [OUTPUT]]
DESCRIPTION
Filter adjacent matching lines from INPUT (or standard input), writing to OUTPUT (or standard output).
With no options, matching lines are merged to the first occurrence.
Mandatory arguments to long options are mandatory for short options too.
-c, --count
prefix lines by the number of occurrences
-d, --repeated
only print duplicate lines, one for each group
-D print all duplicate lines
--all-repeated[=METHOD]
like -D, but allow separating groups with an empty line; METHOD={none(default),prepend,separate}
-f, --skip-fields=N
avoid comparing the first N fields
--group[=METHOD]
show all items, separating groups with an empty line; METHOD={separate(default),prepend,append,both}
-i, --ignore-case
ignore differences in case when comparing
-s, --skip-chars=N
avoid comparing the first N characters
-u, --unique
only print unique lines
-z, --zero-terminated
line delimiter is NUL, not newline
-w, --check-chars=N
compare no more than N characters in lines
--help display this help and exit
--version
output version information and exit
A field is a run of blanks (usually spaces and/or TABs), then non-blank characters. Fields are skipped before chars.
Note: 'uniq' does not detect repeated lines unless they are adjacent. You may want to sort the input first, or use 'sort -u' without
'uniq'. Also, comparisons honor the rules specified by 'LC_COLLATE'.
AUTHOR
Written by Richard M. Stallman and David MacKenzie.
REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Report uniq translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO comm(1), join(1), sort(1)
Full documentation at: <http://www.gnu.org/software/coreutils/uniq>
or available locally via: info '(coreutils) uniq invocation'
GNU coreutils 8.28 January 2018 UNIQ(1)