I have a flat file and need to count no of records in the file less the header and the trailer record.
I would appreciate any and all asistance
Thanks
Hadi Lalani (2 Replies)
hi,
How to check a given file for a string and if it's not found, exit out ofthe script?
e.g. a file Test123 is there whose header begins with #bt and trailer begins with #ed.
I have to check if the header and trailer matches as above and if not, exit out of the script.
How can we do it in... (2 Replies)
Hi everyone,
I am new to Unix programming. My inquries is:-
a) How to add a Header and Trailer in the set of data
b) Include a number count of the data in the trailer
The set of data only contained the information of 'Customer's Name' and 'Account Number'. I would like to add the Header... (2 Replies)
Hi All,
I am karthik. I am new to this forum. I have one requirement.
I have a file with header and footer.
Header may be like
HDR0001
or
FILE20090110
(Assume it is unknown so far, but i am sure there is a header in the file)
likewise file has the trailer too.
I just... (7 Replies)
Hi,
I want to add the below Header to all the files in sequence File1,File2,File3...etc
"ABC,<number of chracter in the file>"
e,g - If File1 is as below
pqrstuvdt
abcdefgh
then I want to add the above header into it ,So that File1 becomes as below
ABC,17
pqrstuvdt
abcdefgh
... (9 Replies)
for example, i have a file with below content:
123413
866688
816866
818818
i want the output as:
This is header
123413
866688
816866
818818
This is trailer
i am able to achieve it using a bash script. (2 Replies)
Hi,
I need a script that validates a file header/detail/trailer. File layout is:
Header - Rec_Type|File_name|File_Date
Detail - Rec_Type|field1|field2|field3...
Trailder - Rec_Type|File_name|File_Date|Record_count
Sample Data:
HDR|customer_data.dat|20120709... (7 Replies)
Hi ,
My UNIX system is SUN Solaris.
I am trying to do a simple thing as described below.
I have a PIPE delimited file that has header and trailer. So the file is something like below:
Test1.txt looks like something below:
field_data1|field_data2|and some more data --Header
... (5 Replies)
I am planning to automate multiple files through Unix script.
Could you please guide for making the automation for multiple files ?
Eg.
I have to check header and footer for all files in the particular path and the header pattern should match with the filename.
Filename- Filename.txt... (2 Replies)
Discussion started by: karthick2020333
2 Replies
LEARN ABOUT LINUX
dat.conf
DAT.CONF(5)DAT.CONF(5)NAME
dat.conf - configuration file for static registration of user-level DAT rdma providers
DESCRIPTION
The DAT (direct access transport) architecture supports the use of multiple DAT providers within a single consumer application. Consumers
implicitly select a provider using the Interface Adapter name parameter passed to dat_ia_open().
The subsystem that maps Interface Adapter names to provider implementations is known as the DAT registry. When a consumer calls
dat_ia_open(), the appropriate provider is found and notified of the consumer's request to access the IA. After this point, all DAT API
calls acting on DAT objects are automatically directed to the appropriate provider entry points.
A persistent, administratively configurable database is used to store mappings from IA names to provider information. This provider infor-
mation includes: the file system path to the provider library object, version information, and thread safety information. The location and
format of the registry is platform dependent. This database is known as the Static Registry (SR) and is provided via entries in the
dat.conf file. The process of adding a provider entry is termed Static Registration.
Registry File Format
* All characters after # on a line are ignored (comments).
* Lines on which there are no characters other than whitespace
and comments are considered blank lines and are ignored.
* Non-blank lines must have seven whitespace separated fields.
These fields may contain whitespace if the field is quoted
with double quotes. Within fields quoated with double quotes,
the backslash or qoute are valid escape sequences:
* Each non-blank line will contain the following fields:
- The IA Name.
- The API version of the library:
[k|u]major.minor where "major" and "minor" are both integers
in decimal format. User-level examples: "u1.2", and "u2.0".
- Whether the library is thread-safe: [threadsafe|nonthreadsafe]
- Whether this is the default section: [default|nondefault]
- The library image, version included, to be loaded.
- The vendor id and version of DAPL provider: id.major.minor
- ia params, IA specific parameters - device name and port
- platform params, (not used)
Example netdev entries for OpenFabrics rdma_cm providers, both v1.2 and v2.0
OpenIB-cma u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 "ib0 0" ""
ofa-v2-ib0 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 "ib0 0" ""
NOTE: The OpenFabrics providers use <ia_params> to specify the device with one of the following:
network address, network hostname, or netdev name; along with port number.
The OpenIB- and ofa-v2- IA names are unique mappings. Reserved for OpenFabrics providers.
The default location for this configuration file is /etc/dat.conf. The file location may be overridden with the environment variable
DAT_OVERRIDE=/your_own_directory/your_dat.conf.
SEE ALSO
25 March 2008 DAT.CONF(5)