Results 1 to 2 of 2

Thread: Removing line with sed command in Linux

  1. #1
    FosterWood is offline Senior Member
    Join Date
    Dec 2009
    Posts
    215
    Rep Power
    3

    Default Removing line with sed command in Linux

    I want to know command that can use to delete line from particular file and when I open file again that line should not be there. So please provide me some suggestions about this. Any help will be appreciated.

  2. #2
    MoralesMyers is offline Senior Member
    Join Date
    Dec 2009
    Posts
    202
    Rep Power
    3

    Default

    By using one process you can delete line from file. There are options included with command. Options are utilized to count and detect lines.

    Code:
    (echo "g//d"; echo 'wq') | ex -s My_list
    "g//d" performs 'delete' operation and 'wq' Writes file to disk and 'Quits' after updating file.

Similar Threads

  1. Command Line Arguments
    By BrooksGray in forum Programming
    Replies: 1
    Last Post: 06-15-2010, 02:33 PM
  2. Command line vs. GUI in Linux
    By JacksonPerez in forum Linux/Free BSD
    Replies: 1
    Last Post: 06-11-2010, 01:43 PM
  3. Command line installation
    By Agustin321 in forum General Software Terms
    Replies: 0
    Last Post: 04-17-2009, 06:20 AM
  4. Windows XP, and command line
    By techno23 in forum Windows XP
    Replies: 0
    Last Post: 02-21-2008, 01:58 PM
  5. Command line in the WINDOWS
    By techno23 in forum Windows Vista
    Replies: 0
    Last Post: 02-15-2008, 01:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48