Skip to content

Instantly share code, notes, and snippets.

@ChimeraCoder
Created July 20, 2012 19:45

Revisions

  1. ChimeraCoder created this gist Jul 20, 2012.
    4 changes: 4 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    #Please tell me there is a better way to do this
    #(And by 'a better way', I don't mean incorporating the cut within the awk script)

    npm ls | grep -E "^(├|└)─" | cut -d" " -f2 | awk '{FS = "@"; print "\""$1"\"", ":", "\""$2"\""}'