News for hackers. Stuff that matters.
Re:The Linux Commands HandBook by roryrjb on Thursday November 05, 2020 @02:58AM (#24996430)
Yeah this is OK, but running macOS commands for Linux deployments doesn't work all the time. What about `lsblk` or `ip`? Also md5 vs md5sum. Also and I don't have macOS handy to try it, I'm pretty sure grep has differing options. I can't count how many times friends and colleagues who use macOS for development have put BSD commands into Dockerfiles and CI pipelines and have wondered why it didn't work.
Re:The Linux Commands HandBook by Fnoord on Thursday November 05, 2020 @07:57AM (#24997825)
Your criticism is valid, but its possible to get compatibility between macOS (or another BSD) and Linux. GNU utilities are already mentioned but there's also, for example,

> What about `lsblk` or `ip`?

For a (partly compatible) equivalent to ip I can recommend iproute2mac [1]. You can also use the old utilities from BSD (ifconfig, route, etc) or the GUI.

For lsblk I found no drop-in replacement, just equivalents [2]

On top of that, Nix works on Linux and macOS.

[1] https://github.com/brona/iproute2mac

[2] https://apple.stackexchange.com/questions/107953/list-all-de...

[3] https://nixos.org

Re:The Linux Commands HandBook by qz2 on Thursday November 05, 2020 @03:10AM (#24996474)
This was a massive problem for me as well. And they laughed at me using a virtual machine with Linux in it while they were pissing around with broken stuff...
Re:The Linux Commands HandBook by znpy on Thursday November 05, 2020 @03:59AM (#24996681)
When I was given a macbook at work I used to curse all the time at mac os' grep which is not gnu grep, and lacks a lot of nice cool features...
Re:The Linux Commands HandBook by miked85 on Thursday November 05, 2020 @04:02AM (#24996690)
You can use brew to install gnu grep as a replacement.
Re:The Linux Commands HandBook by williamtwild on Thursday November 05, 2020 @05:43AM (#24997157)
Its funny how people will admit to being upset about something when they are supposed to be tech saavy and should have just googled the solution .
Re:The Linux Commands HandBook by snoopen on Thursday November 05, 2020 @06:23AM (#24997310)
on my work MacBook we can't just brew install things, no admin permissions except for whitelisted things
Re:The Linux Commands HandBook by znpy on Thursday November 05, 2020 @03:29PM (#25001642)
Thank god somebody understands that not everybody is given toy macbooks to install whatever they like with no screening and/or block list.
Re:The Linux Commands HandBook by miked85 on Thursday November 05, 2020 @07:37PM (#25003691)
You can install brew to any directory, including your home directory.
Re:The Linux Commands HandBook by CamJN on Thursday November 05, 2020 @02:32PM (#25001166)
Lucky that you can install homebrew into your home directory with no admin rights then!