Hi,
I need to compare two flat files (yesterday & today's data) and get only the changed data from flat files. In flat file i dont have data column or anything its just a string data in flat file.Can any one please let me know the script
With Regds
Shashi (3 Replies)
I'm trying to compare the first column values in two different files that use a numerical value as the key and output the more meaningful value found in the second column of file1 in front of the matching line(s) in file2. My problem is that file2 has multiple records. For example given:
FILE1... (4 Replies)
I have searched about 30 threads, a load of Google pages and cannot find what I am looking for. I have some of the parts but not the whole. I cannot seem to get the puzzle fit together.
I have three folders, two of which contain different versions of multiple files, dist/file1.php dist/file2.php... (4 Replies)
I am not an expert in awk, SED, etc... but I really hope there is a way to do this, because I don't want to have to right a program. I am using C shell.
FILE 1 FILE 2
H0000000 H0000000
MA1 MA1
CA1DDDDDD CA1AAAAAA
MA2 ... (2 Replies)
I did some searches, but couldn't really find what I'm looking for. I have a file formatted as below:
BOF ABC CO - XYZ COMM DATA OF 07/05/2011
EBA00000001 sdfa rtyus uyml
EBB00000001 54682 984w3
EBA00000002 mkiyuasdf 98234
I want to pull the date from the header record and add it... (4 Replies)
I have 2 zip files which have about 20 million records in each file. file 2 will have additional records than file 1. I want to compare the records in both the files and capture the new records from file 2 into another file file3. Please help me with a command/script which provides me the desired... (8 Replies)
Hi ,
My requirement is to Compare 2 files having different number of columns and records and get the ouptut containing all the non-matching records from File A(with all column values ) .Example data below :
File A contains following :
Aishvarya |1234... (4 Replies)
Good morning all,
I have a problem that is one step beyond a standard awk compare.
I would like to compare three files which have several thousand records against a fourth file. All of them have a value in each row that is identical, and one value in each of those rows which may be duplicated... (1 Reply)
hi.. I want to compare records present in 1 file with those in 3 other files and print those records of file 1 which are not present in any of the files. for eg -
file1 file2 file3 file4
1 1 5 7
2 2 6 9
3
4
5
6
7
8
9
... (3 Replies)
Discussion started by: Abhiraj Singh
3 Replies
LEARN ABOUT OPENSOLARIS
acctcon
acctcon(1M) System Administration Commands acctcon(1M)NAME
acctcon, acctcon1, acctcon2 - connect-time accounting
SYNOPSIS
/usr/lib/acct/acctcon [-l lineuse] [-o reboot]
/usr/lib/acct/acctcon1 [-p] [-t] [-l lineuse] [-o reboot]
/usr/lib/acct/acctcon2
DESCRIPTION
acctcon converts a sequence of login/logoff records to total accounting records (see the tacct format in acct.h(3HEAD)). The login/logoff
records are read from standard input. The file /var/adm/wtmpx is usually the source of the login/logoff records; however, because it might
contain corrupted records or system date changes, it should first be fixed using wtmpfix. The fixed version of file /var/adm/wtmpx can then
be redirected to acctcon. The tacct records are written to standard output.
acctcon is a combination of the programs acctcon1 and acctcon2. acctcon1 converts login/logoff records, taken from the fixed /var/adm/wtmpx
file, to ASCII output. acctcon2 reads the ASCII records produced by acctcon1 and converts them to tacct records. acctcon1 can be used with
the -l and -o options, described below, as well as with the -p and -t options.
OPTIONS -p Print input only, showing line name, login name, and time (in both numeric and date/time formats).
-t acctcon1 maintains a list of lines on which users are logged in. When it reaches the end of its input, it emits a session
record for each line that still appears to be active. It normally assumes that its input is a current file, so that it uses
the current time as the ending time for each session still in progress. The -t flag causes it to use, instead, the last time
found in its input, thus assuring reasonable and repeatable numbers for non-current files.
-l lineuse lineuse is created to contain a summary of line usage showing line name, number of minutes used, percentage of total elapsed
time used, number of sessions charged, number of logins, and number of logoffs. This file helps track line usage, identify
bad lines, and find software and hardware oddities. Hangup, termination of login(1) and termination of the login shell each
generate logoff records, so that the number of logoffs is often three to four times the number of sessions. See init(1M) and
utmpx(4).
-o reboot reboot is filled with an overall record for the accounting period, giving starting time, ending time, number of reboots, and
number of date changes.
EXAMPLES
Example 1 Using the acctcon command.
The acctcon command is typically used as follows:
example% acctcon -l lineuse -o reboots < tmpwtmp > ctacct
The acctcon1 and acctcon2 commands are typically used as follows:
example% acctcon1 -l lineuse -o reboots < tmpwtmp | sort +1n +2 > ctmp
example% acctcon2 < ctmp > ctacct
FILES
/var/adm/wtmpx History of user access and administration information
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWaccu |
+-----------------------------+-----------------------------+
SEE ALSO acctcom(1), login(1), acct(1M), acctcms(1M), acctmerg(1M), acctprc(1M), acctsh(1M), fwtmp(1M), init(1M), runacct(1M), acct(2),
acct.h(3HEAD), utmpx(4), attributes(5)NOTES
The line usage report is confused by date changes. Use wtmpfix (see fwtmp(1M)), with the /var/adm/wtmpx file as an argument, to correct
this situation.
During a single invocation of any given command, the acctcon, acctcon1, and acctcon2 commands can process a maximum of:
o 6000 distinct session
o 1000 distinct terminal lines
o 2000 distinct login names
If at some point the actual number of any one of these items exceeds the maximum, the command will not succeed.
SunOS 5.11 22 Feb 1999 acctcon(1M)