9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
2 scripts to convert IP ranges to CIDR notation using awk, gawk or mawk. The scripts are much faster than using ipcalc and will return the same results. The first script is reliably compatible with awk, gawk and mawk but is over 3 times as slow as the second script which is reliably compatible with... (38 Replies)
Discussion started by: azdps
2. Shell Programming and Scripting
Recently I had to convert a 280K lines of ip ranges to the CIDR notation and generate a file to be used by ipset (netfilter) for ip filtering.
000.000.000.000 - 000.255.255.255 , 000 , invalid ip
001.000.064.000 - 001.000.127.255 , 000 , XXXXX
001.000.245.123 -... (10 Replies)
Discussion started by: ripat
3. Shell Programming and Scripting
Hi all, I would appreciate if someone could share how to convert CIDR notation to netmask and vice versa.
The value below is just an example. it could be different numbers/ip addresses.
Initial Output, let say file1.txt
Final Output, let say file2.txt (3 Replies)
Discussion started by: type8code0
4. UNIX for Dummies Questions & Answers
I have a string containing fields separated by space
set sr="Fred Ted Joe Peter Paul Jean Chris Tim Tex"
and want to display it in a column format, for example to a maximum
of a window of 100 characters
And hopefully display some thing like
Fred Ted Joe ... (3 Replies)
Discussion started by: kristinu
5. Shell Programming and Scripting
I have a file 1.txt with the below contents.
I have 3 more files in a folder
The contents of those three files are similar format with different data values... (8 Replies)
Discussion started by: realspirituals
I'm coding a network program and i need it to "understand" ip ranges, but i don't know how to make to parse an IP CIDR range, let's say "172.16.10.0/24" to work with the specified IP range.
I've found a program which does it, but i don't understand the code. Here is the... (3 Replies)
Discussion started by: semash!
7. Shell Programming and Scripting
EDIT : This is for perl
@data2 = grep(/$data/, @list_now);
This gives me @data2 as
Printing data2 11 testzone1 running /zones/testzone1 ***-*****-****-*****-***** native shared
But I really cant access data2 by its individual elements.
$data2 is the entire list, while $data,2,3...... (1 Reply)
Discussion started by: shriyer
8. UNIX for Dummies Questions & Answers
I have 150 txt files named chunk1, chunk2, ........., chunk150. I have a second file called string.txt with more than 1000 unique strings, house, dog, cat ... I want to know which command I should use to count how many times each string appears in the 150 files.
I have tried... (4 Replies)
Discussion started by: Pep Puigvert
9. UNIX for Dummies Questions & Answers
Here is my problem. there are two files.
first.txt <<< contains email address
second.txt <<< contains webpage links
http://www.test.com/abe/index.html... (2 Replies)
Discussion started by: paulds