Next Hold Space 12

ed regexes

  • Just /re/ would find the next line in the file that matched

  • /re/command would find a matching line and execute the command

  • g/re/command would execute the command globally

    • that is, on each matching line

  • If the command was p, it would print the matching line:

     g/re/p     # print all lines maching a pattern

continued...
Next Next