473,382 Members | 1,424 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to use Sed to remove characters from file?

My pipe delimited file is coming over with spurious “\” characters inserted into some alpha fields,
which is causing the records to be split into 2.

Eg Abc|def|10/11\
AAAA|xyz
Lmn|opq|10/11BBBB|xyz
etc etc
I am having to go into vi, then enter /\ to locate each occurrence, enter x to delete the character,
then enter shift and J to join the two into one.

I have been advised that I can use a “sed” type file to automate this,but do not know how,
nor the syntax to be used

Can anybody please help ?
Nov 1 '10 #1
2 2943
Mariostg
332 100+
I don't have vi in fromt of me ta the moment, but how about this in vi :%s#\\\n##g
Nov 1 '10 #2
thanks Mariostg
I actually came up with

sed -e :a -e '/\\$N; s/\\\n//; ta'

which is more or less what you are proposing.

Best Regards
Nov 2 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Marian | last post by:
Hi, I am totaly novice in .NET and I am studying a book about this. There was mentioned "assembly". I did not understand, how function does it has . I would like to know the exact run of code...
4
by: Tim Bird | last post by:
Hi all. I have recently installed VB2005 so teach myself programming, could anyone suggest any links to useful websites, or help sites, Ideally I am looking for tutorials, written for the...
2
by: peter | last post by:
(i'm new to javascript) I found the following Javascript and is confused by its syntax. Why the expression "window.status=input.form.value;" is valid (i verified this in ie6) and has the same...
1
by: gretchen.ogrady | last post by:
I admit - I'm a simple user but looking to improve skills. Instructions aren't helping and have searched this group but am getting bogged down by some of the programming-speak. I have a query...
4
by: trond | last post by:
Hello all, Before I start I'd like to point out that I am a complete novice when it comes to asp.net - My background is in network and operating systems, and although I have been doing a bit of...
12
by: chadlupkes | last post by:
I've been trying to create a simple (I hope) PHP application to send emails to a membership list. I have yet to successfully connect to my database to pull the names and email addresses. I'm...
16
by: Brian D | last post by:
I have a multiple select list that is created dynamically based on a previous selection on an asp page. The first thing I do is to clear the curent option list by ...
9
by: Kelii | last post by:
I've been trying to get this piece to work for a few hours, but have given up. I hope someone out there can help, I think the issue is relatively straightforward, but being a novice, I'm stumped....
25
by: 7stud | last post by:
I can't break out of the for loop in this example: ------ import sys lst = for line in sys.stdin: lst.append(line) break
5
by: =?ISO-8859-2?Q?Istv=E1n?= | last post by:
Could somebody suggest me a novice Python list, please? Thanks, Istvan
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.