Training-modules
Training-modules copied to clipboard
Advanced unix and Sed
Care with sed on the Advanced Unix module. Macs come with BSD sed, but the lesson is for GNU sed. There is some functionality in the lesson that doesn't work in BSD sed which works in GNU sed. To install GNU sed on a Mac, you can install Homebrew:
https://brew.sh
Do the "Next Steps" which were like:
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/$USER/.bash_profile
eval "$(/opt/homebrew/bin/brew shellenv)"
Install GNU sed with the following command:
brew install gnu-sed
Then you should be able to call GNU sed with the gsed
command.