?
Solved

removing extra char with sed

Posted on 2011-03-03
2
Medium Priority
?
434 Views
Last Modified: 2012-06-27
Hi,

I am trying to remove the extra 'F0' char from the first field and the leading '3' from the second field of this sample file and wld appreciate some help with sed.
757000300F0,3123456,2010/04/07,13:00:00
757003456F0,314567434,2010/04/07,14:00:00
0
Comment
Question by:nevyana2006
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 46

Accepted Solution

by:
Kent Olsen earned 2000 total points
ID: 35031772
Hi nevyana,

Does the first field always end in 'F0' and does the second field always start with '3'?

If so, perhaps the easiest is:

  sed 's/F0,3/,/' myfile



Kent
0
 

Author Comment

by:nevyana2006
ID: 35031844
Hi, yes they do, thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month13 days, 20 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question