Merge pull request #40 from Peilin-D/patch-1

Update ch13_the_global_command.md; Remove extra '/'
This commit is contained in:
Igor Irianto 2020-10-26 08:22:34 -05:00 committed by GitHub
commit 5f9de76cf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,9 +136,9 @@ To match the lines containing between three to six zeroes, run:
You can pass a range before the `g` command. Here are some ways you can do it:
- `:1,5/g/console/d` matches the string "console" between lines 1 and 5 and deletes them.
- `:,5/g/console/d` if there is no address before the comma, then it starts from the current line. It looks for the string "console" between the current line and line 5 and deletes them.
- `:3,/g/console/d` if there is no address after the comma, then it ends at the current line. It looks for the string "console" between line 3 and the current line and deletes them.
- `:1,5g/console/d` matches the string "console" between lines 1 and 5 and deletes them.
- `:,5g/console/d` if there is no address before the comma, then it starts from the current line. It looks for the string "console" between the current line and line 5 and deletes them.
- `:3,g/console/d` if there is no address after the comma, then it ends at the current line. It looks for the string "console" between line 3 and the current line and deletes them.
- `:3g/console/d` if you only pass one address without a comma, it executes the command only on line 3. It looks on line 3 and deletes it if has the string "console".
In addition to numbers, you can also use these symbols as range: