Sponsored Content
Full Discussion: ip range addresses
Top Forums Shell Programming and Scripting ip range addresses Post 302431340 by kkkk on Monday 21st of June 2010 03:34:22 PM
Old 06-21-2010
Quote:
Originally Posted by Scrutinizer
There was a recent thread about that subject here: https://www.unix.com/showthread.php?t=137518
awk -F. 'NR==1 {pre=$1"."$2; a=$3; d=$4} NR==2 {b=$3; c=$4} END {for(i=a;i<=b;i++) for(j=d;j<=c;j++) print pre"."i"."j}' input_file

works great if the input file is like

192.168.0.1
192.168.3.1


but my input is a bit different: 192.168.0.1 192.168.3.1

just need a little tweak for awk i guess.

Thanks
 

10 More Discussions You Might Find Interesting

1. IP Networking

Finding IP Addresses

Is there anyway to tell what my NT IP is while logging into my UNIX box. I have users accessing our NT network and then telneting into our Unix Box. I would like to restrict access somehow. My who commands only returns the users name and pts device which changes. (1 Reply)
Discussion started by: golfs4us
1 Replies

2. IP Networking

ip addresses

this might sound corny but i need help finding out about finding a persons ip address can u halp? and another question what the hell does ping mean??? thank u. (2 Replies)
Discussion started by: dragonslayer100
2 Replies

3. IP Networking

Ip Addresses

I'm not exactly sure what I can do with IPs... my friend won't tell me(don't ask me why, I figure it's cause he doesn't know either, hehe). I'm curious as to what theya re used for other than networking computers... if there IS any other purpose or use for them. That's all. --Evil_d00d (4 Replies)
Discussion started by: evil_d00d
4 Replies

4. Programming

memory addresses

where is addresses(what kind of memory) like this one "df605d50". I want to print address of locan variable: printf("&i - %p", &i); and I have &i - df605d50. (0 Replies)
Discussion started by: Paravozzz
0 Replies

5. Programming

memory addresses

you have three variables of type char, int and float in continous memory locations. How do you print the contents of each of these.??? Thanks in advance. (0 Replies)
Discussion started by: areef4u
0 Replies

6. Programming

LInear Addresses

Hi all, Even after reading many explanation the question still haunting me what's the difference between physical and linear addresses.Can we directly access physical addresses .If not then paging circuitry would have ensure contiguous physical addresses regardless of any linear addresses but this... (2 Replies)
Discussion started by: joshighanshyam
2 Replies

7. UNIX and Linux Applications

email addresses

Greetings to all. I have installed dadamail on my web site and it works extremely well. I have two questions: 1. I have modified dada to bounce bad emails, but only the first newsletter will use the modifications. If I create another list, it doesn't use the modification. What gives? 2. Are... (0 Replies)
Discussion started by: okbrowder
0 Replies

8. UNIX for Dummies Questions & Answers

Different ip addresses

Hello! I have logged in using Putty into another machine 'tele'. The ip address which i used to login to 'tele' is 192.168.1.3. Now while at 'tele' when i run "#ifconfig -a" i get the same ip address i.e, 192.168.1.3. But when i run "#arp tele" it gives the output: tele (10.143.128.8) ... (9 Replies)
Discussion started by: suhail.sadaqat
9 Replies

9. Shell Programming and Scripting

Extract IP addresses

The only way I could extract the user names and 'from' IP addresses is to use a few temp files. Split up by 'Failed keyboard-interactive' and 'Failed password'. Anyone have any idea to do this all in one go? aaa.bbb.ccc.ddd 2009-03-23 01:28:33 sshd: Failed keyboard-interactive/pam... (2 Replies)
Discussion started by: hazno
2 Replies

10. Shell Programming and Scripting

print range between two patterns if it contains a pattern within the range

I want to print between the range two patterns if a particular pattern is present in between the two patterns. I am new to Unix. Any help would be greatly appreciated. e.g. Pattern1 Bombay Calcutta Delhi Pattern2 Pattern1 Patna Madras Gwalior Delhi Pattern2 Pattern1... (2 Replies)
Discussion started by: joyan321
2 Replies
PRINTER_LIST(3) 							 1							   PRINTER_LIST(3)

printer_list - Return an array of printers attached to the server

SYNOPSIS
array printer_list (int $enumtype, [string $name], [int $level]) DESCRIPTION
The function enumerates available printers and their capabilities. PARAMETERS
o $enumtype -$enumtype must be one of the following predefined constants: o PRINTER_ENUM_LOCAL: enumerates the locally installed printers. o PRINTER_ENUM_NAME: enumerates the printer of $name, can be a server, domain or print provider. o PRINTER_ENUM_SHARED: this parameter can't be used alone, it has to be OR'ed with other parameters, i.e. PRINTER_ENUM_LOCAL to detect the locally shared printers. o PRINTER_ENUM_DEFAULT: (Win9.x only) enumerates the default printer. o PRINTER_ENUM_CONNECTIONS: (WinNT/2000 only) enumerates the printers to which the user has made connections. o PRINTER_ENUM_NETWORK: (WinNT/2000 only) enumerates network printers in the computer's domain. Only valid if $level is 1. o PRINTER_ENUM_REMOTE: (WinNT/2000 only) enumerates network printers and print servers in the computer's domain. Only valid if $level is 1. o $name - Used with PRINTER_ENUM_NAME. o $level -$level sets the level of information request. Can be 1,2,4 or 5. RETURN VALUES
Return an array of printers. EXAMPLES
Example #1 printer_list(3) example <?php /* detect locally shared printer */ var_dump(printer_list(PRINTER_ENUM_LOCAL | PRINTER_ENUM_SHARED)); ?> PHP Documentation Group PRINTER_LIST(3)
All times are GMT -4. The time now is 04:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy