FWIW, here is my Cookie Counter pipeline command:
Code:
sed 's/[[:cntrl:]]//g' ~/Library/Cookies/Cookies.plist |
  awk -F. '/Domain/ { getline; print $(NF-1) "." $NF }' |
    sed 's/<[^<]*>//g' |sort -b -d -f -i |uniq -c |
      awk -v tot=0 '{ tot += $1; print $0 }
        END { print(" === =====================\n",
          tot, "cookies in", NR, "domains") }' |
            pr -3 -t -i100 -o1 -w96


Just paste that code into a text file named cc, make it executable (chmod a+x) and put it in your $PATH somewhere. Then simply typing cc in Terminal will display a true cookie count. [note: terminal window must be at least 96-chars wide to avoid wrapping, and even then, domain names longer than 26-chars will be truncated. E.g., facebookapplicationdevelopment.org will be printed as facebookapplicationdevelop.]

One could also copy/paste that text directly into Terminal... but it's much easier to save as a file and then just type cc

[either way, that pipeline is totally "safe" in that it only reads stuff... i.e., no data anywhere is altered one bit.]

Last edited by Hal Itosis; 01/13/12 04:07 PM.