12-01-2011
faster way than what? What have you already done?
What do the contents of the zip file look like? As in, what filenames?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there,
I have written a script called "compare" (see below) to make comparison between 2 files namely test_put.log and Output_A0.log
#!/bin/ksh
while read file
do
found="no"
while read line
do
echo $line | grep $file > /dev/null
if
then
echo $file found
found="yes"
break
fi... (3 Replies)
Discussion started by: lweegp
3 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I searched the forums on the keywords in the title I used above, but I did not find the answer:
Is it possible to count records in a .zip file on an AIX machine if i don't have pkunzip installed?
From all the research I'm reading in google and the reading of pkunzip in Unix.com,... (3 Replies)
Discussion started by: tekster757
3 Replies
3. Shell Programming and Scripting
Hi All,
I have two files say file1 and file2.
I want to check the number of records in file1 and if its atleast 2 (i.e., 2 or greater than 2 ) then I have to check records in file2 .If records in file2 is atleast 1 (i.e. if its not empty ) i have to set some conditions .
Could you pls... (3 Replies)
Discussion started by: mavesum
3 Replies
4. Shell Programming and Scripting
Hi Friends,
I am new to Shell Scripting and need your help in the below situation.
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- "Application handle" is the common field in both the files.
(NOTE :- PLEASE REFER TO THE ATTACHMENT "Compare files... (2 Replies)
Discussion started by: Santoshbn
2 Replies
5. Shell Programming and Scripting
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2.
- I tried to modify and use... (10 Replies)
Discussion started by: Santoshbn
10 Replies
6. Shell Programming and Scripting
Hi Freinds ,
I have 2 files .
File 1
|nag|HYd|1|Che
|esw|Gun|2|hyd
|pra|bhe|3|hyd
|omu|hei|4|bnsj
|uer|oeri|5|uery
File 2
|nag|HYd|1|Che
|esw|Gun|2|hyd
|uer|oi|3|uery
output : (9 Replies)
Discussion started by: i150371485
9 Replies
7. Shell Programming and Scripting
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)
Discussion started by: nashton
1 Replies
8. Shell Programming and Scripting
hi.. i am using solaris system and ksh and using nawk to get records of file1 not in file2(not line by line comparison). code i am using is nawk 'NR==FNR{a++} !a {print"line:" FNR"->" $0} ' file2 file1
same command with awk runs perfectly on darwin kernel(mac) but in solaris it does line by... (2 Replies)
Discussion started by: Abhiraj Singh
2 Replies
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
Hi Guys,
I wanted to compare a delimited file and positional file, for a particular key files and if it matches then append the positional file with some data.
Example:
Delimited File
--------------
Byer;Amy;NONE1;A5218257;E5218257
Byer;Amy;NONE1;A5218260;E5218260
Positional File... (3 Replies)
Discussion started by: Ajay Venkatesan
3 Replies
runacct(1M) runacct(1M)
NAME
runacct - run daily accounting
SYNOPSIS
[mmdd[state]]
DESCRIPTION
runacct is the main daily accounting shell procedure. It is normally initiated via cron(1M). runacct processes connect, fee, disk, and
process accounting files. It also prepares summary files for prdaily or billing purposes.
runacct takes care not to damage active accounting files or summary files in the event of errors. It records its progress by writing
descriptive diagnostic messages into When an error is detected, a message is written to mail (see mail(1), mailx(1), or elm(1)) is sent to
and and runacct terminates. runacct uses a series of lock files to protect against re-invocation. The files and are used to prevent
simultaneous invocation, and is used to prevent more than one invocation per day.
runacct breaks its processing into separate, restartable states using to remember the last state completed. It accomplishes this by writ-
ing the state name into runacct then looks in to see what it has done and to determine what to process next. states are executed in the
following order:
Move active accounting files into working files.
Verify integrity of
file, correcting date changes if necessary.
Produce connect session records in
format.
Convert process accounting records into
format.
Merge the connect and process accounting records.
Convert output of
chargefee into format and merge with connect and process accounting records.
Merge disk accounting records with connect, process, and fee accounting
records.
Merge the daily total accounting records in
with the summary total accounting records in
Produce command summaries.
Any installation-dependent accounting programs can be
included here.
Cleanup temporary files and exit.
To restart runacct after a failure, first check the file for diagnostics, then fix up any corrupted data files such as or The files and
file must be removed before runacct can be restarted. The argument mmdd is necessary if runacct is being restarted, and specifies the
month and day for which runacct will rerun the accounting. Entry point for processing is based on the contents of to override this,
include the desired state on the command line to designate where processing should begin.
EXAMPLES
To start runacct.
To restart runacct.
To restart runacct at a specific state.
WARNINGS
Normally it is not a good idea to restart runacct in its state. Run manually, then restart via:
If runacct failed in its state, remove the last file because it will not be complete.
FILES
SEE ALSO
mail(1), acct(1M), acctcms(1M), acctcom(1M), acctcon(1M), acctmerg(1M), acctprc(1M), acctsh(1M), cron(1M), fwtmp(1M), acct(2), acct(4),
utmp(4).
STANDARDS CONFORMANCE
runacct(1M)