I have made several attempts to read two files of ip addresses and eliminate records from file1 that are in file2.
My latest attempt follows. Everything works except my file3 is exactly the same as file1 and it should not be.
# !/usr/bin/bash
#
# NoInterfaces
# Utility will create a file... (8 Replies)
Hi,
My first post to this group...
I have a need to to parse a source file which is a capture from a network analyser.
I have two fields that need to be checked:
- Field 7 represents the packet length (an integer), and
Field 4 represents a network address (e.g. 192.168.25.3)
- The... (10 Replies)
Need a script that manipulates a fixed length file that will compare 2 fields in that file and if they are equal write that line to a new file.
i.e. If fields 87-93 = fields 119-125, then write the entire line to a new file. Do this for every line in the file. After we get only the fields... (1 Reply)
Hi unix gurus,
I have a urgent requirement, I need to write a AWK script to compare each fields in 2 files using AWK.
Basically my output should be like this.
file1
row|num1|num2|num3
1|one|two|three
2|one|two|three
file2
row|num1|num2|num3
1|one|two|three
2|one|two|four
... (5 Replies)
Hi All,
Looking for a quick AWK script to output some differences between two files.
FILE1
device1 1.1.1.1 PINGS
device1 2.2.2.2 PINGS
FILE2
2862 SITE1 device1-prod 1.1.1.1 icmp - 0 ... (4 Replies)
Attached is a file called diff.txt
It is the output from this command:
diff -y --suppress-common-lines --width=5000 1.txt 2.txt > diff.txt
I have also attached 1.txt and 2.txt for your convenience.
Both 1.txt and 2.txt contain one very long CSV string.
File 1.txt is a CSV dump of... (0 Replies)
Hi all !
If there is only one single value in a column (e.g. column 1 below), then return this value in the same output column.
If there are several values in the same column (e.g. column 2 below), then return the different values separated by "," in the output.
pipe-separated input:
... (11 Replies)
I'm trying to compare 2 files for differences in a selct number of fields. When differnces are found it will write the whole record of the second file including appending '|C' out to a delta file. Each record will have 20 fields, but only want to do comparison of 1st 15 fields. The 1st field of... (7 Replies)
Hello experts!
I have 2 files.
file1 is a list file containing uniquely names. e.g.:
name1 number number
name2 number number
name5 number number
name10 number number
...
file2 is a data file arbitrary containing the names of file1 in paragraphs separated by "10" e.g.
name4 ... (3 Replies)
I have two files:
smw:/working/iso_testing # cat a
QConvergeConsoleCLI-1.1.03-49.x86_64.rpm
aaa_base-13.2+git20140911.61c1681-1.3.i586.rpm
acpica-20140724-2.1.2.i586.rpm
test.rpm
smw:/working/iso_testing # cat b
QConvergeConsoleCLI-1.1.03-49.x86_64.rpm... (12 Replies)
Discussion started by: jedlund21
12 Replies
LEARN ABOUT CENTOS
rlm_counter
rlm_counter(5) FreeRADIUS Module rlm_counter(5)NAME
rlm_counter - FreeRADIUS Module
DESCRIPTION
The rlm_counter module provides a general framework to allow access based on accumulated usage of a resource, such as total time online in
a given period, total data transferred in a given period, etc. This is very useful in a 'Prepaid Service' situation, where a user has paid
for a finite amount of usage and should not be allowed to use more than that service. Collection, monitoring, and replenishment of prepaid
services are beyond the scope of this module.
The main configuration items to be aware of are:
filename
The filename where the usage data is stored.
key An attribute which will be present in the Access-Request to be used as the 'index' value for the counter. A counter entry is tracked
for each unique key. The most likely key you will want to use is User-Name.
count_attribute
An attribute which will be used to increment the counter value. If this attribute is Acct-Session-Time or an integer value the
counter data is incremented by the Attribute value. For all other attribute types the counter is incremented by one.
reset How frequently the counter data should be set back to 0. Valid values for this variable are: hourly, daily, weekly, monthly, orn-
ever Alternatively, it can be user defined, in the form: num[hdwm]. num is a numeric value, followed by one or none of the follow-
ing letters. h: hours, d: days, w: weeks, m: months.
check_name
This defines an attribute name which will be registered by the counter module and can be used to set the maximum allowed value for
the counter after which the user is rejected. If Daily-Session-Time is set, you can use the following syntax in the Users file to
set a cap of 3600 seconds ( 8 hours ):
DEFAULT Max-Daily-Session := 3600
reply_name
This is the name of the attribute which will contain the remaining value for the counter in the reply packet when the user is suc-
cessfully authorized. The default attribute name is "Session-Timeout".
allowed_service_type
This can be used to only apply the limitations to specific service types of sessions. For example, setting this to Framed-User will
only apply the counter module to Framed sessions, excluding other types such as Telnet or Rlogin.
cache_size
The maximum size of the cache to be used by the module. The default is 1000.
NOTES
This module registers an attribute, so it should be added to the instantiate section, to be called on server startup. When used in the
authorize section, it must come after any modules which set the 'check_name' attribute.
SECTIONS
instantiate, authorize, accounting
FILES
/etc/raddb/radiusd.conf
SEE ALSO radiusd(8), radiusd.conf(5)rlm_sqlcounter(5)AUTHOR
Chris Parker, cparker@segv.org
13 March 2004 rlm_counter(5)