How to eliminate ^L


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to eliminate ^L
# 1  
Old 06-01-2011
How to eliminate ^L

Hi,

I am trying to create a text file from data retrieved from a query.The data retrieved is having this character '^L' at regular intervals of the data.

How can i eliminate this, Please find below the sample data.

I tried sed -e "s/\^L//g" to convert it, but with no luck

^LCODE*SERIAL
^L341*37616
-
-
-
^L225*4103

Please help
# 2  
Old 06-01-2011
try this

Code:
tr -d '\14' <infile >outfile

14 is the octal value of ctrl+L
# 3  
Old 06-01-2011
Thank you for your response

I tried the 'tr' command but that did not work, no change in the data
# 4  
Old 06-01-2011
can you attach your input file ?
# 5  
Old 06-01-2011
How to eliminate ^L

Hi ,

U can try this method ,
open the file using vi <filename>
and then type the following command in escape mode
:s/ctrl v shift l//g
ctrl v shift l will print the ^L and all occurrences will be removed . SmilieSmilie
# 6  
Old 06-01-2011
Input file

Please find attached the input file i am using.
# 7  
Old 06-01-2011
mann2719,

Thank you for your response

i am trying this in the script and the converted file am sending as inout to another script.

can you please suggest any option that i can use it in script.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help to eliminate the records

Hi All, Please help me how to remove the records from the file if it is having more number of fields than the required one, before loading into stage Here is the sample records. File is space delimited one chandu 1121324 CC ( 2 spaces) chandu balu 434657 DD (3 spaces) -- failing due to... (10 Replies)
Discussion started by: bbc17484
10 Replies

2. Shell Programming and Scripting

To eliminate the created filename

Hi All, I have two files in the directory file1.txt file2.txt I gave ls -m > output.txt command and I got the output as file1.txt, file2.txt, output.txt But my output should be like file1.txt, file2.txt Thanks in advance. (6 Replies)
Discussion started by: dubuku_01
6 Replies

3. UNIX for Dummies Questions & Answers

[Solved] eliminate characters in vi

hey guys. what command in vi editor should I write to make this M83RDK-078A -1 1 1024 1 1024 OK X | M83RDK-055 -1 1 627 1 627 OK X | become like this M83RDK-078A 1 1024 M83RDK-055 1... (5 Replies)
Discussion started by: muhnandap
5 Replies

4. Shell Programming and Scripting

Compare and eliminate

Could any one help me to compare the date value say at 10th column with sysdate (i.e current date) and if diffrence is more than 50 days then filter them out from the file. The file contain 10000 records. head file 00971502657744 A671FAHP2EW8BG1369172011HRWS contact information ... (6 Replies)
Discussion started by: zooby
6 Replies

5. Programming

Ways to eliminate Zombies?

what are the precautions to be taken care for avoiding zombie process ? (8 Replies)
Discussion started by: Gopi Krishna P
8 Replies

6. Shell Programming and Scripting

How to eliminate < > sign meaning

Hi I would like to replace one of our script, and add some pre-checking for the input file before running the command, but I bumped into the following issue: Original command: use < input.txt I cannot modify the original command, but I created the useit script which would be called as... (2 Replies)
Discussion started by: apapp
2 Replies

7. Shell Programming and Scripting

eliminate pathname from the file name in the o/p

Hi, Im finding some files form a specific path and den writing those files to another file as: find /SYS/admin/data/xml -name '*.xml' -type f ! -newer file1 -print >>out.xml and when im doing cat out.xml im getting like dis: ... (2 Replies)
Discussion started by: ss_ss
2 Replies

8. Shell Programming and Scripting

Eliminate unwanted data

Hi, I am stuck on writing a script that reads a file, retains wanted data but discards unwanted data from a CSV file. This is a sample of my table {not the actual data) ID Color tel_num Name color2 color3 abcdef green 5551212 jj88 red blue acbdfe yellow... (5 Replies)
Discussion started by: t524ube
5 Replies

9. UNIX for Dummies Questions & Answers

How to eliminate wrapped lines

I have a file abc: line 1 line 2 line 3 line 4 And I am successfully e-mailing the file, with this: mail -s "contents of abc" jdoe@email.com <<EOF cat abc EOF But the e-mail shows up looking like this: subject: contents of abc line 1 line 2 line 3 line 4 The carriage returns... (5 Replies)
Discussion started by: tumblez
5 Replies

10. Shell Programming and Scripting

How to eliminate inf value in AWK

Hi, I have the calculations which return me infinity (inf), -inf, other very larger number when I printed them out. I did try to insert some control condition not to print these out if the above condition is met. The code I implemented is something like:- for (i=0;i<=1000;i++){ ... (3 Replies)
Discussion started by: ahjiefreak
3 Replies
Login or Register to Ask a Question