03-18-2012
Remove <CR><LF> from the dat file in unix
Hi,
The source system has created the file in the dat format and put into the linux directory as mentioned below. I want to do foloowing things.
a) Delete the Line started with <CR><LF> in the record
b)Also line
...........................................................<CR><LF>
Source file
PCEXT.DAT P<CR><LF>
BATCH HRIS<CR><LF>
<CR>LF>
E 0003547-620-955 55FTM SHHC 520601810914 2<CR><LF>
F1 0003001Gordon_Davan 243 Consumers Road<CR><LF>
H 0003999 1 D 10 9042 0648639<CR><LF>
...........................................................<CR><LF> J 0003 1 763400 0<CR><LF>
J 0003 2ONN 6 00050001<CR><LF>
J 0003 6ONN 3 12100100<CR><LF>
LA 0003###-####<CR><LF>
LB 0003810914 13<CR><LF>
<CR>LF>
E 0003547-620-955 55FTM SHHC 520601810914 2<CR><LF>
F1 0003001Gordon_Davan 243 Consumers Road<CR><LF>
H 0003999 1 D 10 9042 0648639<CR><LF>
...........................................................<CR><LF> J 0003 1 763400 0<CR><LF>
J 0003 2ONN 6 00050001<CR><LF>
J 0003 6ONN 3 12100100<CR><LF>
LA 0003###-####<CR><LF>
LB 0003810914 13<CR><LF>
<CR>LF>
Output file should be like this .
PCEXT.DAT P<CR><LF>
BATCH HRIS<CR><LF>
E 0003547-620-955 55FTM SHHC 520601810914 2<CR><LF>
F1 0003001Gordon_Davan 243 Consumers Road<CR><LF>
H 0003999 1 D 10 9042 0648639<CR><LF>
J 0003 1 763400 0<CR><LF>
J 0003 2ONN 6 00050001<CR><LF>
J 0003 6ONN 3 12100100<CR><LF>
LA 0003###-####<CR><LF>
LB 0003810914 13<CR><LF>
E 0003547-620-955 55FTM SHHC 520601810914 2<CR><LF>
F1 0003001Gordon_Davan 243 Consumers Road<CR><LF>
H 0003999 1 D 10 9042 0648639<CR><LF>
J 0003 1 763400 0<CR><LF>
J 0003 2ONN 6 00050001<CR><LF>
J 0003 6ONN 3 12100100<CR><LF>
LA 0003###-####<CR><LF>
LB 0003810914 13<CR><LF>
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi.
I want to attach a .xls or .dat file while sending mail thru unix.
I have come across diff attachments sending options, but allthose embeds the content in the mail. I want the attachement to be send as such.
Please help me out.
regards
Diwakar (1 Reply)
Discussion started by: diwakar82
1 Replies
2. Shell Programming and Scripting
Hi All,
I have a .dat file named test.dat where I have stored some process IDs.
Now I need to pick a process ID, one by one and then fire kill -9 for each of those. The logic should be:
1. open file <filename.dat>
2. read until last line of file
3. if process ID is found fire kill -9... (5 Replies)
Discussion started by: Sibasish
5 Replies
3. UNIX for Dummies Questions & Answers
I have a .dat file in unix and it keeps failing file validation on line x. How do I delete a data string from a .dat file in UNIX?
I tried the following:
sed -e 'data string' -e file name
and it telling me unrecognized command (4 Replies)
Discussion started by: supergirl3954
4 Replies
4. Shell Programming and Scripting
Hello Gurus,
We are facing some performance issue in UNIX. If someone had faced such kind of issue in past please provide your suggestions on this .
Problem Definition:
/Few of load processes of our Finance Application are facing issue in UNIX when they uses a shell script having below... (19 Replies)
Discussion started by: KRAMA
19 Replies
5. Shell Programming and Scripting
Hi
I have a test.dat file in UNIX which has a data.I am informatica developer i get data in those files.I need to add 50 spaces to those data in test.dat file.I am new to unix So can any one help how can i do that.
I have some 2088 rows in that test.dat file.
Can anyone help me please its... (11 Replies)
Discussion started by: karingulanagara
11 Replies
6. Shell Programming and Scripting
I am a beginner in Unix. Though have been asked to write a script to filter(remove duplicates) data from a .dat file. File is very huge containig billions of records.
contents of file looks like
30002157,40342424,OTC,mart_rec,100, ,0
30002157,40343369,OTC,mart_rec,95, ,0... (6 Replies)
Discussion started by: mukeshguliao
6 Replies
7. Shell Programming and Scripting
All,
I have a file 1181CUSTOMER-L061411_003500.dat.Z having duplicate records in it.
bash-2.05$ zcat 1181CUSTOMER-L061411_003500.dat.Z|grep "90876251S"
90876251S|ABG, AN ADAYANA COMPANY|3550 DEPAUW BLVD|||US|IN|INDIANAPOLIS||DAL|46268||||||GEN|||||||USD|||ABG, AN ADAYANA... (3 Replies)
Discussion started by: Oracle_User
3 Replies
8. Shell Programming and Scripting
Heya there,
A small selection of my data is shown below.
DATE TIME FRAC_DAYS_SINCE_JAN1
2011-06-25 08:03:20.000 175.33564815
2011-06-25 08:03:25.000 175.33570602
2011-06-25 ... (4 Replies)
Discussion started by: gd9629
4 Replies
9. Shell Programming and Scripting
Hi,
I need help to convert the date format in .DAT file in unix.
I want to convert
10@@|SWIFT MT568 Extract@@|Apr 14 2014 5:47:52:563PM@@|Apr 14 2014 4:33:47:663PM@@||##|
into
10@@|SWIFT MT568 Extract@@|04/14/2014/ 5:47:52:563PM@@|04/14/2014 4:33:47:663PM@@||##|
Appreciate... (18 Replies)
Discussion started by: karthikengox
18 Replies
10. Answers to Frequently Asked Questions
i have two files , one is var.txt and another res.dat file
var.txt contains informaton like below
date,request,sales,item
20171015,1,123456,216
20171015,1,123456,217
20171015,2,345678,214
20171015,3,456789,218
and res.dat contains is a one huge file contains information like... (1 Reply)
Discussion started by: pogo
1 Replies
LEARN ABOUT OPENDARWIN
geom
geom(1) geom(1)
NAME
geom - analyzes a molecular geometry input in Cartesian coordinates.
DESCRIPTION
The program geom reads a set of Cartesian coordinates and determines from them the bond distances (Bohr and angstrom), bond angles, tor-
sional angles, out-of-plane angles (optional), moments of inertia, and rotational constants.
FILES REQUIRED
input.dat - Input file
and one of the following:
geom.dat - geometry file
file11.dat - PSI-format geometry/gradient file
FILES GENERATED
geom.out - file containing the analysis
INPUT OPTIONS
The geom program has the following options:
-h Print help information (these options).
-aces [filename]
Read the input in an ACES output format, with each line consisting of atomic symbol, atomic number, and Cartesian coordinates (in
Bohr). The optional argument is the name of the geometry input file, which defaults to geom.dat.
-qchem [filename]
Read the input in an QCHEM output format, with each line consisting of the atom number, the atomic symbol, and Cartesian coordinates
(in Angstroms). The optional argument is the name of the geometry input file, which defaults to geom.dat.
-xyz [filename]
Read the input in an XYZ output format. The first line contains the number of atoms and the second line is a comment line. Subse-
quent lines each contain the atomic symbol and Cartesian X Y and Z coordinates (in Angstroms). The optional argument is the name of
the geometry input file, which defaults to geom.dat.
-oop Print out-of-plane angles, where the angle a-b-c-d is defined as the angle formed by the vector a-d and the plane defined by atoms
b, c, and d.
DO_OOP = boolean
Same as command-line switch -oop described above.
ISOTOPES = matrix of reals/strings
Used to specify masses to be used in the calculation of the center of mass and rotational constants. One array is provided for each
isotopomer to be calculated. The arrays can mix floating point numbers with strings which designate isotopes. If this array is not
given and file11.dat is present, then the masses will be obtained by converting the atomic numbers in file11. If masses are not
given by ISOTOPES or by file11, then no mass-related quantities will be calculated.
-g [filename]
Read Cartesian coordinates from a file other than file11.dat. If a filename is not given, the default is geom.dat. The alternative
file is assumed to be in a format similar to that of PSI's geom.dat. Since such files do not contain atomic numbers, the moments of
inertia and rotational constants are not calculated if this option is used.
READ_GEOM = boolean
This option in input.dat tells geom to read the geometry from geom.dat in the PSI geom.dat format.
-a Print parameters for all pair distances.
PRINT_ALL_DIST = boolean
Same as -a flag described above.
-d distance
Only print parameters involving pairs of atoms which are less than distance bohr apart (default value is 4.0 bohr).
PRINT_DISTANCE = value
Same as -d flag described above.
-angstrom
The input coordinates are in angstroms, not bohr.
ANGSTROM = boolean
If TRUE, the input coordinates are in angstroms instead of bohr. The default is FALSE.
The following example is for calculating the geometrical information for water with several different isotopes. The geometry is
read from geom.dat rather than from file11.dat.
geom: (
read_geom = true
isotopes = (
(O H H)
(O D D)
(O18 1.007825 1.007825)
) )
5 June, 1998 geom(1)