tuxi
tuxi copied to clipboard
Added macOS compatibility
Ensures this script works with macOS by leveraging gnu-sed
versus freeBSD sed
when on macOS.
Also updated README to show macOS specific installation instructions.
umm I thought someone already did that. Is tuxi is not running on mac?
I tested tuxi
on macOS and I can confirm that it does not work properly on macOS. sed
seems to be throwing errors because it is missing a few features which the GNU version of sed
has.
This can be seen in the output below:
$ tuxi unix time
sed: 1: ":a;N;$!ba;s/\n/ /g": unused label 'a;N;$!ba;s/\n/ /g'
sed: 1: ":a;N;$!ba;s/\n/ /g;s/nu ...": unused label 'a;N;$!ba;s/\n/ /g;s/null/\n/g'
usage: paste [-s] [-d delimiters] file ...
---
Unix time is a system for describing a point in
time. It is the number of seconds that have elapsed
since the Unix epoch, minus leap seconds; the Unix epoch
is 00:00:00 UTC on 1 January 1970; leap ...
---
Since we added the "Learn to pronounce" scraper in #152, we can see that the paste
command throws an error as well. This can easily be fixed by using gpaste
if the user is using macOS.
Rebased and did the same for (g)paste:
❯ tuxi unix time
---
Unix time is a system for describing a point in
time. It is the number of seconds that have elapsed
since the Unix epoch, minus leap seconds; the Unix epoch
is 00:00:00 UTC on 1 January 1970; leap ...
---
@Zhann remove the bashisms
@Zhann remove the bashisms
What does that mean? You mean the curly braces? :-)
What does that mean? You mean the curly braces? :-)
Yes, I sent a PR there.
https://mywiki.wooledge.org/Bashism