From: Robert Klemme Date: 2012-08-13T00:39:30+09:00 Subject: Re: Delete a lines from a files On Sun, Aug 12, 2012 at 3:00 PM, Fosiul Alam wrote: > Jan E. wrote in post #1072045: > >> >> You cannot delete a line from a file. But you can overwrite the file and >> skip this line. >> > > Hi thanks > but sorry for late reply. > but how do you skip the line ??? > what would be the steps > thanks If you really only need to delete a single line from a file sed is probably the easiest choice: without backup $ sed -i '/^john/ d' your_file with backup $ sed -i.bak '/^john/ d' your_file Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/