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
set_color
set_color(1) fish set_color(1)
NAME
set_color - set_color - set the terminal color
set_color - set the terminal color
Synopsis
set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR]
Description
Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple,
cyan, white and normal.
o -b, --background Set the background color
o -c, --print-colors Prints a list of all valid color names
o -h, --help Display help message and exit
o -o, --bold Set bold or extra bright mode
o -u, --underline Set underlined mode
o -v, --version Display version and exit
Calling set_color normal will set the terminal color to whatever is the default color of the terminal.
Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey
font color, while set_color --bold white will result in a white font color.
Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator.
set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and
incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of
ncurses and recompile fish against it in order to fix this issue.
Version 1.23.1 Sun Jan 8 2012 set_color(1)