Search Results

Search: Posts Made By: azdps
12,563
Posted By azdps
Noted, thank you for the information. Please...
Noted, thank you for the information. Please close this thread as additional posts have had nothing of value to add to the script(s).
12,563
Posted By azdps
vgersh99...
vgersh99 (https://www.unix.com/member_modal.php?u=37898&modal=1) I did some more testing with the awk script that segmentation faults. I've tested numerous IP ranges and anything that starts with 128...
12,563
Posted By azdps
Yes I was using awk native functions. Here is the...
Yes I was using awk native functions. Here is the script:
function range2cidr(ipStart, ipEnd, result, bits, mask, newip) {
bits = 1
mask = 1
while (bits < 32) {
newip =...
12,563
Posted By azdps
Quanzhou Broadcasting & TV Transmit...
Quanzhou Broadcasting & TV Transmit Center:125.254.192.0-125.254.255.255
SoftbankBB gnufakes:126.72.94.40-126.72.94.40 <-- last success
BBN Communications:128.1.0.0-128.1.255.255
Lawrence...
12,563
Posted By azdps
Tried all 4 variants that you posted Don Cragun....
Tried all 4 variants that you posted Don Cragun. Each one produced a segmentation fault at the exact same place as my previous code using awk. gawk is able to process the entire file without any...
12,563
Posted By azdps
Didn't work vgersh99. yeah I can install gawk. I...
Didn't work vgersh99. yeah I can install gawk. I just wanted it to work with awk. I'm using this on my OpenBSD firewall. I prefer to use base installed programs instead of having to install packages.
12,563
Posted By azdps
I'm using OpenBSD that uses awk...
I'm using OpenBSD that uses awk (https://man.openbsd.org/awk.1) source coding dating back to 2011. gawk is not in the base install of OpenBSD because of the GNU licensing so it has to be installed as...
12,563
Posted By azdps
Forgive my ignorance. I get wrong results when...
Forgive my ignorance. I get wrong results when running the script with a file containing the following IP address ranges. Note that the IP address ranges are separated by a space hyphen space.
...
12,563
Posted By azdps
I tested the new script with these test IP ranges...
I tested the new script with these test IP ranges and it didn't correctly convert the IP ranges to CIDR blocks so I initially thought it wasn't working correctly. The script does not work with this...
12,563
Posted By azdps
Thanks that fixed it. Overall there is a flaw in...
Thanks that fixed it. Overall there is a flaw in the script somewhere though. There are approx 470 IP ranges in the downloaded file that are converted wrong. For example these aren't converted...
12,563
Posted By azdps
vgersh99 while doing some tests with your script...
vgersh99 while doing some tests with your script I noticed it seems to be producing wrong output. I removed the following line from your script and the output then seems to be correct.

!/^#/ && NF...
12,563
Posted By azdps
Thank you vgersh99...
Thank you vgersh99 (https://www.unix.com/members/37898.html). I conducted benchmarks with the way I had previously downloaded the file and used my script and compared it to just downloading the file...
12,563
Posted By azdps
Thank you vgersh99...
Thank you vgersh99 (https://www.unix.com/members/37898.html) for the modified script. I'm using an Intel Celeron N2930 on my OpenBSD box so the timings are definitely different. I appreciative the...
12,563
Posted By azdps
OpenBSD /usr/bin/awk -r-xr-xr-x ...
OpenBSD


/usr/bin/awk


-r-xr-xr-x 1 root bin 180464 Oct 11 12:18 /usr/bin/awk


OpenBSD man page for awk: Here (https://man.openbsd.org/awk.1)
The version of awk that OpenBSD supports...
12,563
Posted By azdps
vgersh99...
vgersh99 (https://www.unix.com/members/37898.html) the sample I provided had a hyphen between the IP address ranges and the one you provided has a space for a field separator. Thank you for...
12,563
Posted By azdps
This works well. awk -f test.awk temp > done ...
This works well. awk -f test.awk temp > done



Thanks I didn't notice that. Added it to my code.

So here is the code I ended up with:

#!/bin/awk -f

# Library with various ip...
12,563
Posted By azdps
After reviewing the suggested post I've come up...
After reviewing the suggested post I've come up with the following code:

#!/bin/sh

# Library with various ip manipulation functions
# convert ip ranges to CIDR notation

function...
12,563
Posted By azdps
Convert IP ranges to CIDR notation
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...
2,613
Posted By azdps
I intentionally changed the tag to token for the...
I intentionally changed the tag to token for the same reason I didn't want to post the entire html page here. It's my cable modem reboot page. I do appreciate your feedback and the yanx.awk solution...
2,613
Posted By azdps
From my OpenBSD firewall I use PERL to reboot my...
From my OpenBSD firewall I use PERL to reboot my cable modem around 3:00 am. I do this daily to obtain a new IP from my ISP otherwise I end up with a static IP for weeks. The procedure I use:

Send...
2,613
Posted By azdps
So I figured out a solution for myself. ...
So I figured out a solution for myself.

Note: Below is just a small portion of my entire HTML string. The entire HTML string contains roughly 17,500 characters.

<input type='hidden'...
2,613
Posted By azdps
Yes HTML and javascript. I don't want to use perl...
Yes HTML and javascript. I don't want to use perl module HTML::TokeParser::Simple. Thanks again.
2,613
Posted By azdps
Perl substr or similar help
I have a large string containing about 17,500 characters and I would like to obtain the value for token. token only appears in the entire string once and is towards the end of the string at the...
2,890
Posted By azdps
Can someone convert this python script to perl
There is a python script that I would like converted to a perl script. If someone has the time to convert the script I would appreciate it. You can find the script below:
...
2,708
Posted By azdps
All the following are working solutions to reboot...
All the following are working solutions to reboot the ARRIS SURFboard SB6183 cable modem:

Using curl
curl -d Rebooting=1 http://192.168.100.1/goform/RgConfiguration

Using wget
wget --quiet -O...
Showing results 1 to 25 of 30

 
All times are GMT -4. The time now is 05:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy