mysql -uexampleuser -pletmein exampledb -B -e “select * from \`person\`;” | sed ‘s/\t/”,”/g;s/^/”/;s/$/”/;s/\n//g’ > filename.csv
Archive for the ‘regular’ Category
mysql to csv via sed
Posted in regular on May 25, 2011 | Leave a Comment »
Examples of report/whitepaper landing pages
Posted in regular on October 6, 2010 | Leave a Comment »
CJR: one way, not to my liking…. but…. admob: another… also blah… better but not so hot … – (but they do provide raw data, which is interesting) Ektron/Sitepoint: A survey sponsored by two co’s and available for $$ does a little more packaging Forrester: Like above, but “now, with more Blah!” Gartner: less blah.
Fun with find
Posted in regular, tagged cli, osx on September 30, 2010 | Leave a Comment »
# find all .html files in the current directory and sub directories find . -name “*.html” -type f -print # find all “dot” directories find /Users/smbrown -name “.*” -type d -print # find all “dot” files find /Users/smbrown -name “.*” -type f -print # find all dot files, but omit the pesky OS X .DS_Store [...]
Some DiG/DNS/nslookup tid bits
Posted in regular on September 30, 2010 | Leave a Comment »
Get ttl for a domain: [smbrown@JRCASH-3:~]$ dig +nocmd seanmbrown.net +noall +answer seanmbrown.net. 3574 IN A 174.143.45.137 Flush the dns cashe on Mac OS X [smbrown@JRCASH-3:~]$ dscacheutil -flushcache
