03-10-2009
Are your records actually separated by the = sign lines? And does every record have the same number of lines? Otherwise show us a sample file that reflects your actual data.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am having a problem here. We are having several problems in regards to hung process's on unix (HPUX box), caused by my RF equipment (Mobile data capture units). these contact the host via a simply telnet session and locks the system?
Is it a timeout problem as the timeout is disabled on the host. (5 Replies)
Discussion started by: Subrosa
5 Replies
2. Shell Programming and Scripting
Unix Gurus,
I have been breaking my head to get this done..seems simple..
I need to read a flat file and based on a key word in a line, i need to skip the previous 3 lines.
eg :
Line1
Line2
Line3
Line4
Line5
Line6
Error
Line7
Line8
Line9
Error
Line10 (4 Replies)
Discussion started by: ravred
4 Replies
3. Shell Programming and Scripting
Suppose I have two files 1.txt and 2.txt.
My aim is to find (Total execution time/Number of executions)
then sort the result as in decreasing order.
Can anyone provide me any shell/perl/awk script or a Command to do that in faster way ?
1.txt :
===============================
Number of... (4 Replies)
Discussion started by: Rahulpict
4 Replies
4. Shell Programming and Scripting
I have created a dummy file -demo.txt
On my machine-A (oslevel-5300-08) I can display the file content in HEX format through VI editor using :%!xxd but on other machine-B (oslevel - 5300-06) , I get error as "sh: xxd: not found."
machine-A:
$ cat demo.txt
Hello World !
I can display... (7 Replies)
Discussion started by: Rahulpict
7 Replies
5. Shell Programming and Scripting
Hi,
When we have a failure, sometimes we just step restart the job from the next step. Later when we open the log for analysis of the failure, it is becoming difficult to go to the failure part.
For eg., if it is a 1000 line log, the failure may be at 500th line. so wat i want to do is, grep... (6 Replies)
Discussion started by: ajayakunuri
6 Replies
6. Homework & Coursework Questions
how can i find related pattern in a text file without using grep command in unix (2 Replies)
Discussion started by: feint
2 Replies
7. Shell Programming and Scripting
Hi,
I have a file monitor.txt as below...
# Times are converted to local time from GMT.
# Local Timezone: EST (GMT -05:00)
PARAM1
{
TIME 30;
CC1 "xxxxx";
CC2 "xxxxx";
CC3 "xxxxx";
CC4 "xxxxx";
}
PARAM2
{
4061 :... (3 Replies)
Discussion started by: zaq1xsw2
3 Replies
8. Shell Programming and Scripting
Hello Colleagues,
I have a file that looks like below.
6-12731913-12731913
9230760143480
410018547148230
20131002193434+0500
20131002193434+0500
;20131002T161031000-10.50.241.21-21912131-1419034760, ver: 0
20131009
92220056296730
CC0P
abc
Core_Context_R1A
SMS
6-12726796-12726796... (14 Replies)
Discussion started by: umarsatti
14 Replies
9. Shell Programming and Scripting
Hi ,
I have a file where i have modifed certain things compared to original file . The difference of the original file and modified file is as follows.
# diff mir_lex.c.modified mir_lex.c.orig
3209c3209
< if(yy_current_buffer -> yy_is_our_buffer == 0) {
---
>... (5 Replies)
Discussion started by: breezevinay
5 Replies
10. UNIX for Dummies Questions & Answers
Hi all!
Thanks for taking the time to view this!
I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern.
Example:
Drink a soda
Eat a banana
Eat multiple bananas
Drink an apple juice
Eat an apple
Eat multiple apples
I... (8 Replies)
Discussion started by: demmel
8 Replies
wracct(1M) wracct(1M)
NAME
wracct - write extended accounting records for active processes and tasks
SYNOPSIS
/usr/sbin/wracct -i id_list [-t record_type] {process | task}
The wracct utility allows the administrator to invoke the extended accounting system, if active, to write intermediate records representing
the resource usage of a selected set of processes or tasks. For tasks, a record_type option is also supported, allowing the administrator
to request the writing of:
o an interval record, which reflects task usage since a previous interval record (or since task creation if there is no interval
record), or
o a partial record, which reflects usage since task creation.
The following options are supported:
-i id_list Select the IDs of the tasks or processes to write records for. Specify id_list as a comma- or space-separated list of IDs,
presented as a single argument. For some shells, this requires appropriate quoting of the argument.
-t record_type Select type of record to write for the selected task or process. For tasks, record_type can be partial or interval. partial
is the default type, and the only type available for process records.
The following operands are supported:
process Treat the given ID as a process ID for the purposes of constructing and writing an extended accounting record.
task Treat the given ID as a task ID for the purposes of constructing and writing an extended accounting record.
Example 1: Writing a Partial Record
Write a partial record for all active sendmail processes.
# /usr/sbin/wracct -i "`pgrep sendmail`" process
Example 2: Writing an Interval Record
Write an interval record for the task with ID 182.
# /usr/sbin/wracct -t interval -i 182 task
The following exit values are returned:
0 Successful completion.
1 An error occurred.
2 Invalid command line options were specified.
3 Pertinent components of extended accounting facility are not active.
/var/adm/exacct/task
/var/adm/exacct/proc Extended accounting data files.
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
acctadm(1M), attributes(5)
13 July 2005 wracct(1M)