473,396 Members | 1,871 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,396 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 2945
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
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.