Skip to content

Instantly share code, notes, and snippets.

@suya55
Last active November 22, 2019 08:46
Show Gist options
  • Save suya55/41b47b2913cb0f64a75e2ea6df76d19b to your computer and use it in GitHub Desktop.
Save suya55/41b47b2913cb0f64a75e2ea6df76d19b to your computer and use it in GitHub Desktop.

Revisions

  1. suya55 renamed this gist Nov 22, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. suya55 renamed this gist Nov 22, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. suya55 created this gist Nov 22, 2019.
    6 changes: 6 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    ```
    $ yum install cargo; cargo install sd
    ```
    ```shell
    egrep '(SELECT|UPDATE)' production.log | awk -F']' '{ print $3 }' | awk -F"ms)" '{ print $2 }' | sd "'[a-z0-9/ \.\-:]+'" '?' | sd '= [0-9]+' '= ?' | sd '[0-9]+ ?(, ?[0-9]+)+' '?' | sd '(, ?\?+)' '' | sd "'%.+%'" '?' | sd 'LIMIT [0-9]+' 'LIMIT ?' | sd 'OFFSET [0-9]+' 'OFFSET ?' | sort | uniq
    ```