01-25-2013
Thanks.
But the code has an issue.
the first file has
Header
999records..
I want to start the split from 3rd records. As my file has
Header
\n(One line Gap)
Records
\n(one line gap)
Trailer
Also for trailer I need the record count.
Say if a file has 5005 records... then first 5 files should show
Header, 1000 records, and Trailer(containing the records count of 1000)
6th file should have header, 5 records, Trailer with records count as 5.
10 More Discussions You Might Find Interesting
1. Programming
Hi all,
I have a problem in handling files through C.
here is the problem im having:
i will query the database (for instance consider employees table )
for empno,ename,job,salary fields.The query returns me some 100 of rows. now i need to place them in a file in row wise pattern as they... (3 Replies)
Discussion started by: trinath
3 Replies
2. Programming
Hi all,
I got a little issue here. Imagine that I have more than one process accessing one file. Is it possible to know which process(es) are accessing that file when I open the file??
Thanks for the help.
Best regards,
Ernesto (2 Replies)
Discussion started by: ninjanesto
2 Replies
3. UNIX for Advanced & Expert Users
Hi,
I have a log file which runs into 3 to 5 GB.
We store this typically for 6 months. When a new month starts we move the previous month into a 9 month back up log (file.9m) and delete the last month of the 9 month back up.
Iam using awk to find the data and cat to join the files like... (3 Replies)
Discussion started by: baanprog
3 Replies
4. UNIX for Advanced & Expert Users
sir i have to get first line from a file
for example
>cat file1
abc
zxc
asd
adsf
from that file1 i need only first line
expected result
>abc
please help me ! (1 Reply)
Discussion started by: ponmuthu
1 Replies
5. UNIX for Advanced & Expert Users
my input for a script is another csv file
but in that file say 7 lines are there ...
how can i get line by line to that input
for example :
>cat link.csv
www.yahoo.com,yahoo
www.google.com,google
www.unix.com,unix
another file
in that file i need to ping the above links
... (2 Replies)
Discussion started by: ponmuthu
2 Replies
6. Shell Programming and Scripting
I have been doing automation of daily check activity for a server, i have been using sqls to retrive the data and while loop for reading the data from the file for several activities. BUT i got a show stopper the below one.. where the data is getting store in $temp_file, but not being read by while... (1 Reply)
Discussion started by: KuldeepSinghTCS
1 Replies
7. Programming
$# some text
$$ some text
$@ some text
$$. some text
Mg1 some text
Mg2 some text
.
.
.
Mg10 some text
The above 10 lines are to be extracted except the lines starting from $#,$$.,... (4 Replies)
Discussion started by: baig.abdul
4 Replies
8. Shell Programming and Scripting
Specifically on RHEL 5.7.
When does the underlying ksh process open and close files? Every time they're accessed, or as little as possible?
Say you have some script like:
CreateFiles()
{
grep "<VALUE1>" ${infile} >> ${outfile}
grep "<VALUE2>" ${infile} >> ${outfile}
...... (4 Replies)
Discussion started by: CarloM
4 Replies
9. UNIX for Dummies Questions & Answers
I have a file
1
298167
298168
1093209
1093210
1422663
I want to write a code where in I want to read contents of above file
like first read is 1
second read is 298167
Substract second read from first and if this is greater than or less than 99,999.
Similarly I want to traverse thru... (3 Replies)
Discussion started by: Guru148
3 Replies
10. Shell Programming and Scripting
Hi All,
I need to extract the data from the text file. The data of the text file is shown below
#L 0.000017 4.329939 0.000017 4.716267 r7.9 P 1 1;Net=IN32
The extracted data should be IN32. Could anyone help to script in c shell.? (4 Replies)
Discussion started by: gopishrine
4 Replies
LEARN ABOUT OPENSOLARIS
auditstat
auditstat(1M) System Administration Commands auditstat(1M)
NAME
auditstat - display kernel audit statistics
SYNOPSIS
auditstat [-c count] [-h numlines] [-i interval] [-n] [-v]
DESCRIPTION
auditstat displays kernel audit statistics. The fields displayed are as follows:
aud The total number of audit records processed by the audit(2) system call.
ctl This field is obsolete.
drop The total number of audit records that have been dropped. Records are dropped according to the kernel audit policy. See auditon(2),
AUDIT_CNT policy for details.
enq The total number of audit records put on the kernel audit queue.
gen The total number of audit records that have been constructed (not the number written).
kern The total number of audit records produced by user processes (as a result of system calls).
mem The total number of Kbytes of memory currently in use by the kernel audit module.
nona The total number of non-attributable audit records that have been constructed. These are audit records that are not attributable to
any particular user.
rblk The total number of times that the audit queue has blocked waiting to process audit data.
tot The total number of Kbytes of audit data written to the audit trail.
wblk The total number of times that user processes blocked on the audit queue at the high water mark.
wrtn The total number of audit records written. The difference between enq and wrtn is the number of outstanding audit records on the
audit queue that have not been written.
OPTIONS
-c count Display the statistics a total of count times. If count is equal to zero, statistics are displayed indefinitely. A time
interval must be specified.
-h numlines Display a header for every numlines of statistics printed. The default is to display the header every 20 lines. If numlines
is equal to zero, the header is never displayed.
-i interval Display the statistics every interval where interval is the number of seconds to sleep between each collection.
-n Display the number of kernel audit events currently configured.
-v Display the version number of the kernel audit module software.
EXIT STATUS
auditstat returns 0 upon success and 1 upon failure.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
auditconfig(1M), praudit(1M), bsmconv(1M), audit(2), auditon(2), attributes(5)
NOTES
The functionality described in this man page is available only if the Basic Security Module (BSM) has been enabled. See bsmconv(1M) for
more information.
SunOS 5.11 11 Feb 2008 auditstat(1M)