{"action":"created","issue":{"url":"https://api.github.com/repos/danielebailo/couchdb-dump/issues/20","labels_url":"https://api.github.com/repos/danielebailo/couchdb-dump/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/danielebailo/couchdb-dump/issues/20/comments","events_url":"https://api.github.com/repos/danielebailo/couchdb-dump/issues/20/events","html_url":"https://github.com/danielebailo/couchdb-dump/issues/20","id":60398897,"number":20,"title":"Doesn't work in OS X 10.10","user":{"login":"nicktacular","id":810546,"avatar_url":"https://avatars.githubusercontent.com/u/810546?v=3","gravatar_id":"","url":"https://api.github.com/users/nicktacular","html_url":"https://github.com/nicktacular","followers_url":"https://api.github.com/users/nicktacular/followers","following_url":"https://api.github.com/users/nicktacular/following{/other_user}","gists_url":"https://api.github.com/users/nicktacular/gists{/gist_id}","starred_url":"https://api.github.com/users/nicktacular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicktacular/subscriptions","organizations_url":"https://api.github.com/users/nicktacular/orgs","repos_url":"https://api.github.com/users/nicktacular/repos","events_url":"https://api.github.com/users/nicktacular/events{/privacy}","received_events_url":"https://api.github.com/users/nicktacular/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-09T19:46:53Z","updated_at":"2015-04-17T14:48:10Z","closed_at":null,"body":"Great app! Just has some issues with BSD-style commands:\r\n\r\n```ShellSession\r\n[zero]couchdb-dump(master)→ ./couchdb-backup.sh -H thehost.whatever.com -d delivery-index -f db.json -b\r\n./couchdb-backup.sh: line 157: nproc: command not found\r\nexpr: syntax error\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100 12.2M    0 12.2M    0     0  1000k      0 --:--:--  0:00:12 --:--:--  799k\r\n... INFO: File contains Windows carridge returns- converting...\r\ndu: illegal option -- B\r\nusage: du [-H | -L | -P] [-a | -s | -d depth] [-c] [-h | -k | -m | -g] [-x] [-I mask] [file ...]\r\n... ERROR: checkdiskspace() was not passed the correct arguments.\r\n[zero]couchdb-dump(master %)→ uname -a\r\nDarwin zero.local 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/danielebailo/couchdb-dump/issues/comments/94000744","html_url":"https://github.com/danielebailo/couchdb-dump/issues/20#issuecomment-94000744","issue_url":"https://api.github.com/repos/danielebailo/couchdb-dump/issues/20","id":94000744,"user":{"login":"nicktacular","id":810546,"avatar_url":"https://avatars.githubusercontent.com/u/810546?v=3","gravatar_id":"","url":"https://api.github.com/users/nicktacular","html_url":"https://github.com/nicktacular","followers_url":"https://api.github.com/users/nicktacular/followers","following_url":"https://api.github.com/users/nicktacular/following{/other_user}","gists_url":"https://api.github.com/users/nicktacular/gists{/gist_id}","starred_url":"https://api.github.com/users/nicktacular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicktacular/subscriptions","organizations_url":"https://api.github.com/users/nicktacular/orgs","repos_url":"https://api.github.com/users/nicktacular/repos","events_url":"https://api.github.com/users/nicktacular/events{/privacy}","received_events_url":"https://api.github.com/users/nicktacular/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T14:48:10Z","updated_at":"2015-04-17T14:48:10Z","body":"Identify OS X using `uname -a | grep -i darwin`:\r\n```ShellSession\r\n[zero]~→ uname -a | grep -i darwin\r\nDarwin zero.local 14.1.0 Darwin Kernel Version 14.1.0: Thu Feb 26 19:26:47 PST 2015; root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64\r\n```\r\n\r\nFor `du` instead of using `-BK` use just `-k` and you don't need to `sed` out `K` since it's not in the output:\r\n```ShellSession\r\n[zero]~→ du -P -k tracks.json \r\n44\ttracks.json\r\n```\r\n\r\nFor the number of CPUs (as @rajington says) you can use `sysctl` like so:\r\n\r\n```ShellSession\r\n[zero]~→ sysctl -n hw.ncpu\r\n4\r\n```\r\n\r\nIn either case, you could create a few bash functions for this. I'd offer a PR but not any time at the moment to do so.\r\n\r\nThanks for your great tool! I use this on Linux a lot now.\r\n"}}