If you know the number of records (you said they vary, but maybe the number is known somehow), then simply "tail" the last <n> records, where <n> is the number of records (i suppose records to be lines):
If the records are multilined but with a fixed number of <x> lines for each record:
If the records for the present day are not all stored already you still might still know the number of records from the beginning which you have to filter out, leaving the non-filtered records as new. Example: 3 records per day, today is the 10th day of the month. You will have to filter the first 9 days (meaning 9*3=27 lines) and everything left will be from today.
Hola,
Tengo un texto texto1.txt con el siguiente contenido:
Malaga
Cadiz
Sevilla
Hola
Y otro .txt texto2.txt con:
Malaga
Cadiz
Sevilla
Cordoba
Huelva
quiero obtener en otro .txt la diferencia entre estos dos archivos: (14 Replies)
I need to find the difference between two files in UNIX. I tried diff, but couldn't get it right.
There are two files:
file1: apple
mango
strawberry
banana
grape
file2: grape
apple
banana
I need an output file like below: ... (11 Replies)
I have two files as below
File1:
a
b
c
d
File2:
a
b
When i find the difference the output would be c&d..
How can i get my requirement...pls help...
Many thanks in advance (10 Replies)
Hi,
Could anyone help me to solve this problem?
I have two files "f1" and "f2" having 2 fields in each, a) file size and b) file name. The data are almost same in both the files except for few and new additional lines. Now, I have to find out and print the output as, the difference in the... (3 Replies)
I have 2 files as follows.
file1.txt
<cell>123</cell>
<cell>345</cell>
file2.txt
<cell>123</cell>
<cell>456</cell>
out out should be
output.txt
<cell>456></cell>
How do we achieve this> The difference betwenn the two files should be wirtten to the output file..
... (2 Replies)
Hi,
The requirement is to compare two files that has single column of records each. Comparison is to happen on a whole and not line by line.
File1.txt
314589929
315611087
304924413
315989094
301171509
302984393
315609549
314593632
File2.txt
315611087
304924413
315989094 (2 Replies)
Hi , i am newbie to shell scripting and am trying to do the below job,
A shell script to be run with a command like
sh Compare.ksh file1.txt file2.txt 1 2 > file3.txt
1 2-are the key columns
Consider the delimiter would be Tab or comma
File 1:
SK TEST NAME MATHS PHYSICS
21 1... (1 Reply)
Hi , i am newbie to shell scripting and am trying to do the below job,
A shell script to be run with a command like
sh Compare.ksh file1.txt file2.txt 1 2 > file3.txt
1 2-are the key columns
Consider the delimiter would be Tab or comma
File 1:
SK TEST NAME MATHS PHYSICS
21 1 AAA... (1 Reply)
I have two files named Before.txt and After.txt:
Now i want to find the difference in content between <Marker 1> and <Marker 2> in the two files.
---------- Post updated at 05:00 PM ---------- Previous update was at 04:50 PM ----------
Any help will be highly appreciated..:) (3 Replies)
Discussion started by: proactiveaditya
3 Replies
LEARN ABOUT HPUX
lastlogin
acctsh(1M)acctsh(1M)NAME
acctsh: chargefee, ckpacct, dodisk, lastlogin, monacct, nulladm, prctmp, prdaily, prtacct, shutacct, startup, turnacct - shell procedures
for accounting
SYNOPSIS
login-name number
[blocks]
[files ...]
number
file
[mmdd]
file [heading]
[reason]
DESCRIPTION
Can be invoked to charge a
number of units to login-name. A record is written to to be merged with other accounting records during the night.
Should be initiated via
It periodically checks the size of If the size exceeds blocks, 1000 by default, is invoked with argument switch. If the
number of free disk blocks in the file system falls below 500, automatically turns off the collection of process accounting
records via the argument to When at least this number of blocks is restored, the accounting will be activated again. This
feature is sensitive to the frequency at which is executed, usually by
Should be invoked by
to perform the disk accounting functions. By default, it will do disk accounting on the special files in If the flag is
used, it does a slower version of disk accounting by login directory. files specifies the one or more filesystem names
where disk accounting is to be done. If files is used, disk accounting will be done on these filesystems only. If the flag
is used, files should be mount points of mounted filesystem. If omitted, they should be the special file names of mountable
filesystems.
Invoked by to update which shows the last date on which each user logged in (see runacct(1M)).
Should be invoked once each month or each accounting period.
number indicates which month or period it is. If number is not given, it defaults to the current month (01 through 12).
This default is useful if is to executed via on the first day of each month. creates summary files in and restarts summary
files in
Creates file with mode 664 and ensures that owner and group are It is called by various accounting shell procedures.
Can be used to print the session record file normally
created by (see acctcon(1M)).
Invoked by (see runacct(1M)) to format a report of the previous day's accounting data. The report resides in where mmdd is the month
and day of the report. The current daily accounting reports may be printed by typing prdaily. Previous days' accounting
reports can be printed by using the mmdd option and specifying the exact report date desired. The flag prints a report of
exceptional usage by login id for the specifed date. Previous daily reports are cleaned up and therefore inaccessible after
each invocation of The flag prints a report of exceptional resource usage by command, and can be used on current day's
accounting data only.
Can be used to format and print any total accounting
file.
Should be invoked during a system shutdown
to turn process accounting off and append a "reason" record to
Should be called by system startup scripts
to turn the accounting on whenever the system is brought up.
An interface to
(see acct(1M)) to turn process accounting or The argument turns accounting off, moves the current to the next free name in
then turns accounting back on again. (incr is a number starting with and incrementing by one for each additional file.) is
called by and thus can be run under and used to keep to a reasonable size.
FILES
holds all accounting commands listed in section(1M) of this manual
accumulator for fees
working directory
current file for per-process accounting
used if gets large, and during execution of daily accounting procedure
contains the limits for exceptional
usage by command name
contains the limits for exceptional usage by login id
summary directory, should be saved
login/logoff summary
SEE ALSO acct(1M), acctcms(1M), acctcom(1M), acctcon(1M), acctmerg(1M), acctprc(1M), cron(1M), diskusg(1M), fwtmp(1M), runacct(1M), acct(2),
acct(4), utmp(4).
STANDARDS CONFORMANCE acctsh(1M)