Sample Header Ad - 728x90

How do I use modern coreutils on Mac?

4 votes
1 answer
4500 views
How do I get modern coreutils on mac? --- I ran into this problem using csplit: foo.txt:
foo
1
foo
2
foo
3
$: csplit foo '^foo$' '{*}'
# error
Double checking the manpage, man csplit, csplit on Mac is the FreeBSD version and does not offer the '{*}' option. In fact, I must provide the exact number of splits ahead of time. This will either trigger a czplit re-implementation by me, or maybe I can get GNU coreutils on mac. Is there a way?
Asked by Chris (1075 rep)
Dec 20, 2022, 03:32 PM
Last activity: Dec 20, 2022, 08:07 PM