Sponsored Content
Top Forums Shell Programming and Scripting How to remove page breaks from a flat file??? Post 302114469 by kumarsaravana_s on Monday 16th of April 2007 09:43:43 AM
Old 04-16-2007
Quote:
Originally Posted by radoulov
_If I understand correctly the requirement_ with GNU Awk (on Linux, for example) you could try something like this (if all the records start with 0):

Code:
awk '$1=$1' RS="\n0"  inputfile

The records doesnt start with 0.In order to mask the actual data,i just put some dummy values while maintaining the structure of the records.The record start with two numeric formats...like 100**** and 99****

Regards,
Kumar
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Insert page breaks into .csv file

I have large .csv files that I need to get page breaks into. I am taking comma delimited files of over a million records and putting them into a pdf file. Is there a way, using sed or otherwise, to insert some type of page break character into my file? (2 Replies)
Discussion started by: welsht
2 Replies

2. Programming

Page Breaks

Hi, I have a program in Pro*c when I run it I have no problem with the output but when it runs via the at command and except the output has page breaks every 66 lines. I don't want those page breaks to be in the output. any idea? (9 Replies)
Discussion started by: rama71
9 Replies

3. Shell Programming and Scripting

Help on page breaks

Hi, I am new to Unix (AIX). I have a header (in a text file) that needs to be wrtitten on all the pages of a result file (text file). After the header is written, data needs to be read from a file A(text file) and inserted to the result file. If the number of lines reaches 80 in a page, page... (1 Reply)
Discussion started by: simhasuri
1 Replies

4. UNIX for Dummies Questions & Answers

how to remove the first line from a flat file ?

Hi, I want to remove the first line from a flat file using unix command as simple as possible. Can anybody give me a hand ? Thanks in advance. xli (21 Replies)
Discussion started by: xli
21 Replies

5. UNIX for Dummies Questions & Answers

How to remove numeric characters in the flat file

HI, can any one help me please .. i have flat file like qwer123rt ass3242ccf jjk654 kjh838ppp nhdg453ok hdkk34 i want remove numeric characters in the flat file i want output like this qwerrt assccf jjk kjhppp nhdgok hdkk help me... (4 Replies)
Discussion started by: rafimd1985
4 Replies

6. Shell Programming and Scripting

Remove line breaks in csv file using shell script

Hi All, I've a csv file in which the record is getting break into 1 line or more than one line. I want to combine those splits into one line and remove the unwanted character existing in the record i.e. double quote symbol ("). The line gets break only when the record contains double... (4 Replies)
Discussion started by: rajak.net
4 Replies

7. Shell Programming and Scripting

script for adding page number before page breaks

Hi, If there is an expert that can help: I have many txt files that are produced from pdftotext that include page breaks the page breaks seem to be unix style hex 0C. I want to add page numbers before each page break as in : Page XXXX Regards antman (9 Replies)
Discussion started by: antman
9 Replies

8. UNIX for Advanced & Expert Users

Remove duplicates in flat file

Hi all, I have a issues while loading a flat file to the DB. It is taking much time. When analyzed i found out that there are duplicates entry in the flat file. There are 2 type of Duplicate entry. 1) is entire row is duplicate. ( i can use sort | uniq) to remove the duplicated entry. 2) the... (4 Replies)
Discussion started by: samjoshuab
4 Replies

9. UNIX for Dummies Questions & Answers

Page breaks and line breaks

Hi All, Need an urgent solution to an issue . We have created a ksh file or shell script which generates 1 DAT file. the DAT file contains extract of a select statement . Now the issue is , when we are executing the ksh file , the output is coimng with page breaks and line breaks . We have... (4 Replies)
Discussion started by: Ayaskant
4 Replies

10. Shell Programming and Scripting

Remove first NULL Character in Flat File

We have a flat file with below data : ^@^@^@^@00000305^@^@^@^@^@^@430^@430^@^@^@^@^@^@^@^@^@09079989530As we can see ^@ is Null character in this file I want to remove only the first few null characters before string 00000305 How can we do that, any idea. I want a new file without first few... (5 Replies)
Discussion started by: simpltyansh
5 Replies
bsmrecord(1M)						  System Administration Commands					     bsmrecord(1M)

NAME
bsmrecord - display Solaris audit record formats SYNOPSIS
/usr/sbin/bsmrecord [-d] [ [-a] | [-e string] | [-c class] | [-i id] | [-p programname] | [-s systemcall] | [-h]] DESCRIPTION
The bsmrecord utility displays the event ID, audit class and selection mask, and record format for audit record event types defined in audit_event(4). You can use bsmrecord to generate a list of all audit record formats, or to select audit record formats based on event class, event name, generating program name, system call name, or event ID. There are two output formats. The default format is intended for display in a terminal window; the optional HTML format is intended for viewing with a web browser. OPTIONS
The following options are supported: -a List all audit records. -c class List all audit records selected by class. class is one of the two-character class codes from the file /etc/secu- rity/audit_class. -d Debug mode. Display number of audit records that are defined in audit_event, the number of classes defined in audit_class, any mismatches between the two files, and report which defined events do not have format information available to bsmrecord. -e string List all audit records for which the event ID label contains the string string. The match is case insensitive. -h Generate the output in HTML format. -i id List the audit records having the numeric event ID id. -p programname List all audit records generated by the program programname, for example, audit records generated by a user-space program. -s systemcall List all audit records generated by the system call systemcall, for example, audit records generated by a system call. The -p and -s options are different names for the same thing and are mutually exclusive. The -a option is ignored if any of -c, -e, -i, -p, or -s are given. Combinations of -c, -e, -i, and either -p or -s are ANDed together. EXAMPLES
Example 1: Displaying an Audit Record with a Specified Event ID The following example shows how to display the contents of a specified audit record. % bsmrecord -i 6152 login: terminal login program /usr/sbin/login see login(1) event ID 6152 AUE_login class lo(0x00001000) header-token subject-token text-token error message exit-token Example 2: Displaying an Audit Record with an Event ID Label that Contains a Specified String The following example shows how to display the contents of a audit record with an event ID label that contains the string login. # bsmrecord -e login terminal login program /usr/sbin/login see login(1) event ID 6152 AUE_login class lo(0x00001000) header-token subject-token text-token error message exit-token rlogin program /usr/sbin/login see login(1) - rlogin event ID 6155 AUE_rlogin class lo(0x00001000) header-token subject-token text-token error message exit-token EXIT STATUS
0 Successful operation non-zero Error FILES
/etc/security/audit_class Provides the list of valid classes and the associated audit mask. /etc/security/audit_event Provides the numeric event ID, the literal event name, and the name of the associated system call or program. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsr | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ |Interface Stability |Unstable | +-----------------------------+-----------------------------+ SEE ALSO
audit_class(4), audit_event(4), attributes(5) DIAGNOSTICS
If unable to read either of its input files or to write its output file, bsmrecord shows the name of the file on which it failed and exits with a non-zero return. If no options are provided, if an invalid option is provided, or if both -s and -p are provided, an error message is displayed and bsm- record displays a usage message then exits with a non-zero return. NOTES
If /etc/security/audit_event has been modified to add user-defined audit events, bsmrecord displays the record format as undefined. SunOS 5.10 14 Jan 2003 bsmrecord(1M)
All times are GMT -4. The time now is 09:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy