Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: ripat
4,468
Posted By Scrutinizer
Note: The order in for (i in a) is arbitrary, so...
Note: The order in for (i in a) is arbitrary, so it cannot be used reliably to preserve order. An alternative would be to use a for(i=min;i<=max;i++) loop..
for example:
awk 'NR==FNR{A[$1]=++c;...
27,921
Posted By Chubler_XL
How about this for range2cidr (Then call it like...
How about this for range2cidr (Then call it like this range2cidr(ip2dec($1), ip2dec($2)):

function range2cidr(ipStart, ipEnd, bits, mask, newip) {
bits = 1
mask = 1
while (bits <...
1,924
Posted By Subbeh
with awk: awk '{a[FNR]=a[FNR]" "$3}END{for...
with awk:

awk '{a[FNR]=a[FNR]" "$3}END{for (i in a) print i a[i]}' file1 file2 file3
5,117
Posted By fpmurphy
Yes, here is an example XSL stylesheet which...
Yes, here is an example XSL stylesheet which outputs the name elements:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:atom="http://www.w3.org/2005/Atom"
...
11,301
Posted By danmero
awk '/start/{f=1;print;while (getline <...
awk '/start/{f=1;print;while (getline < "file2"){print}}/end/{f=0}!f' file1
Showing results 1 to 5 of 5

 

Featured Tech Videos

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