Changes between Version 7 and Version 8 of Csle2022/Agenda/linuxpackagemanagement


Ignore:
Timestamp:
Oct 19, 2022, 6:04:02 PM (2 years ago)
Author:
deepthi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Csle2022/Agenda/linuxpackagemanagement

    v7 v8  
    156156`:q!`
    157157
     1585.Search:
     159
     160To search the word After the cursor uses the backslash key and then write the word and press enter.
     161
     162`:/word`
     163
     164 - Use `:n` to move on next matching word
     165
     166 - Use `:N` to move on previous matching word
     167
     168
     1696.Search and Replace:
     170
     171To replace the word in file use s/ command in vim like
     172
     173`:s/searchword/replaceword/`
     174
     175To do replace all occurrence of word use g
     176
     177`:s/searchword/replaceword/g`
     178
     179This command will replace the word globally.
     180
     181To confirm before replacements of words use gc
     182
     183`:s/searchword/replaceword/gc`
     184
     185To use this command in the whole file use % before the command
     186
     187`:%s/searchword/replaceword/gc`
     188
    158189== Filters - find, grep, sed and awk ==
    159190