On Sun, Aug 12, 2012 at 3:00 PM, Fosiul Alam <[email protected]> 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/ -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
