GeekInterview.com
Series: Subject: Topic:
Question: 2 of 55

Want to delete the record if I find a word (dd)in the fixed length(5-7).

Want to delete the record if I find a word (dd)in the length(5-7). Lets think that (5-7) length is FF2. This is a fixed width file. ex f1 ff1 ff2 ff3 sds dd fd sd ss ew dd dd se o/p should be like ff1 ff2 ff3 sd ss ew
Asked by: bujji4you | Member Since May-2012 | Asked on: May 22nd, 2012

View all questions by bujji4you

Showing Answers 1 - 3 of 3 Answers
suvarna

Answered On : Jul 27th, 2012

in vi mode

:/dd/d(dd is the pattern which u want to delete)

  
Login to rate this answer.
Gaurav

Answered On : Oct 2nd, 2012

sed s/dd //g file

  
Login to rate this answer.
SaintHax

Answered On : Oct 4th, 2012

sed /dd/d $file

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.