step1、install Xcode
step2、install xcpkg
step3、update xcpkg-formula-repository
xcpkg update
step4、build and install grep
xcpkg install grep
xcpkg formula view grep
{{ formula }}
if the formula of grep dosn't meet your needs, you can edit it ⤵︎
xcpkg formula edit grep
after editing, you may want to rebuild this package ⤵︎
xcpkg install grep