Skip to content

Instantly share code, notes, and snippets.

@joelittlejohn
Last active November 6, 2020 16:56

Revisions

  1. joelittlejohn renamed this gist May 21, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. joelittlejohn revised this gist May 1, 2013. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion find-unused.sh
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,4 @@
    #!/bin/bash
    for f in $(egrep -o -R "defn?-? [^ ]*" * --include '*.clj' | cut -d \ -f 2 | sort | uniq); do echo $f $(grep -R --include '*.clj' "$f" * | wc -l); done | grep " 1$"
    for f in $(egrep -o -R "defn?-? [^ ]*" * --include '*.clj' | cut -d \ -f 2 | sort | uniq); do
    echo $f $(grep -R --include '*.clj' -- "$f" * | wc -l);
    done | grep " 1$"
  3. joelittlejohn revised this gist Feb 7, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions find-unused.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,2 @@
    #!/bin/bash
    for f in $(egrep -o -R "defn?-? [^ ]*" * --include '*.clj' | cut -d \ -f 2 | sort | uniq); do echo $f $(grep -R --include '*.clj' "$f" * | wc -l); done | grep " 1$"
  4. joelittlejohn created this gist Feb 7, 2013.
    1 change: 1 addition & 0 deletions find-unused.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    for f in $(egrep -o -R "defn?-? [^ ]*" * --include '*.clj' | cut -d \ -f 2 | sort | uniq); do echo $f $(grep -R --include '*.clj' "$f" * | wc -l); done | grep " 1$"