Skip to content

Instantly share code, notes, and snippets.

@tonythell
Last active January 30, 2017 02:00
Show Gist options
  • Select an option

  • Save tonythell/d3d15dc33e798788f9b2853774574f8b to your computer and use it in GitHub Desktop.

Select an option

Save tonythell/d3d15dc33e798788f9b2853774574f8b to your computer and use it in GitHub Desktop.

Revisions

  1. tonythell revised this gist Jan 30, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion remove_replace_with_vim.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ### Remove content from within a line.

    Here we want to remove the UUID number, which will be replaced later.
    Remove the UUID number, which will be replaced later.
    ```
    KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-360060e80100a82f00530203700000055", SYMLINK+="asm-data001", OWNER="grid", GROUP="oinstall", MODE="0660"
    KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-360060e80100a82f00530203700000056", SYMLINK+="asm-data002", OWNER="grid", GROUP="oinstall", MODE="0660"
  2. tonythell revised this gist Jan 30, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion remove_replace_with_vim.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-360060e80100a82f00530203700000057", S
    KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-360060e80100a82f00530203700000058", SYMLINK+="asm-data004", OWNER="grid", GROUP="oinstall", MODE="0660"
    ```

    Using the following command.
    Using the following command.
    `:%s/3600.\{-}\"/\"/`

    It will become:
  3. tonythell created this gist Jan 30, 2017.
    20 changes: 20 additions & 0 deletions remove_replace_with_vim.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    ### Remove content from within a line.

    Here we want to remove the UUID number, which will be replaced later.
    ```
    KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-360060e80100a82f00530203700000055", SYMLINK+="asm-data001", OWNER="grid", GROUP="oinstall", MODE="0660"
    KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-360060e80100a82f00530203700000056", SYMLINK+="asm-data002", OWNER="grid", GROUP="oinstall", MODE="0660"
    KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-360060e80100a82f00530203700000057", SYMLINK+="asm-data003", OWNER="grid", GROUP="oinstall", MODE="0660"
    KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-360060e80100a82f00530203700000058", SYMLINK+="asm-data004", OWNER="grid", GROUP="oinstall", MODE="0660"
    ```

    Using the following command.
    `:%s/3600.\{-}\"/\"/`

    It will become:
    ```
    KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-", SYMLINK+="asm-data001", OWNER="grid", GROUP="oinstall", MODE="0660"
    KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-", SYMLINK+="asm-data002", OWNER="grid", GROUP="oinstall", MODE="0660"
    KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-", SYMLINK+="asm-data003", OWNER="grid", GROUP="oinstall", MODE="0660"
    KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-", SYMLINK+="asm-data004", OWNER="grid", GROUP="oinstall", MODE="0660"
    ```