Solved

removing extra char with sed

Posted on 2011-03-03
2
429 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 45

Accepted Solution

by:
Kdo earned 500 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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…
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…

770 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