Changes between Version 3 and Version 4 of Csle2022/Agenda/linuxfilters


Ignore:
Timestamp:
Nov 29, 2022, 12:34:38 AM (2 years ago)
Author:
deepthi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Csle2022/Agenda/linuxfilters

    v3 v4  
    13613610.Deleting lines from a particular file : SED command can also be used for deleting lines from a particular file. SED command is used for performing deletion operation without even opening the file
    137137Examples:
    138  1.To Delete a particular line say n in this example
     138 10.1.To Delete a particular line say n in this example
    139139Syntax:
    140140`$ sed 'nd' filename.txt`
     
    143143`$ sed '5d' filename.txt`
    144144
    145 2. To Delete a last line
     14510.2. To Delete a last line
    146146
    147147Syntax:
     
    149149`$ sed '$d' filename.txt`
    150150
    151 3. To Delete line from range x to y
     15110.3. To Delete line from range x to y
    152152
    153153Syntax:
     
    159159`$ sed '3,6d' filename.txt`
    160160
    161 4. To Delete from nth to last line
     16110.4. To Delete from nth to last line
    162162
    163163Syntax:
     
    169169`$ sed '12,$d' filename.txt`
    170170
    171 5. To Delete pattern matching line
     17110.5. To Delete pattern matching line
    172172
    173173Syntax: