Solved

removing extra char with sed

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

758 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now