?
Solved

removing extra char with sed

Posted on 2011-03-03
2
Medium Priority
?
437 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
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

850 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