> On Jan 16, 2018, at 21:34, Vlad Ghitulescu wrote:
> homebrew
>
> https://apple.stackexchange.com/questions/69223/how-to-replace-mac-os-x-utilities-with-gnu-core-utilities
>
> Aha!
> Never thought I need this until now…
Homebrew is interesting for the breadth of choice
Hi, Jean-Christophe!
On 15 Jan 2018, at 13:58, Jean-Christophe Helary wrote:
On Jan 15, 2018, at 14:46, Vlad Ghitulescu
wrote:
What are the GNU Coreutils good for?
They are common Linux utilities of which some BSD equivalents are
present on macOS.
On 16 Jan 2018, at 13:57, Jean-Christophe Helary wrote:
drwxr-xr-x@ 5 Vlad staff 170 14 Jan 21:17 .
drwxr-xr-x@ 17 Vlad staff 578 15 Jan 06:44 ..
-rwxr-xr-x@ 1 Vlad staff 111 1 Nov 2016
Delete_Viewed_Video_in_Lynda_TOC.pl
-rwxr--r--@ 1 Vlad staff 69 15 Jan 06:32 Randomize.sh
-rwxr-xr-x@ 1
> On Jan 16, 2018, at 21:36, Vlad Ghitulescu wrote:
>
>>> drwxr-xr-x@ 5 Vlad staff 170 14 Jan 21:17 .
>>> drwxr-xr-x@ 17 Vlad staff 578 15 Jan 06:44 ..
>>> -rwxr-xr-x@ 1 Vlad staff 111 1 Nov 2016 Delete_Viewed_Video_in_Lynda_TOC.pl
>>> -rwxr--r--@ 1 Vlad staff 69 15 Jan
On 15 Jan 2018, at 15:33, Sam Hathaway wrote:
That worked even whitout making the file Randomize.sh executable with
chmod +x Randomize!
Take a look:
Vlads27iMac2012:Text Filters Vlad$ ls -al
total 48
drwxr-xr-x@ 5 Vlad staff 170 14 Jan 21:17 .
drwxr-xr-x@ 17 Vlad staff 578 15 Jan 06:44
On 01/14/2018, at 15:31, Sam Hathaway > wrote:
> Try replacing the contents of your “Randomize” text filter with:
> #!/usr/bin/env perl
> use List::Util 'shuffle';
> print shuffle();
Hey Vlad,
I'm with Sam, although I'd write it
On 15 Jan 2018, at 0:46, Vlad Ghitulescu wrote:
(sorry for the following dumb questions… I've used Linux last time
in 1993! :-)
What are the GNU Coreutils good for?
Should I install them too? (I've read about the difference in the
performance of the various randomizer solutions in the
> On Jan 15, 2018, at 14:46, Vlad Ghitulescu wrote:
>
> What are the GNU Coreutils good for?
They are common Linux utilities of which some BSD equivalents are present on
macOS.
https://www.gnu.org/software/coreutils/manual/coreutils.html
> Should I install them too?
Hi, Sam!
Thanks for staying with me! :-)
On 14 Jan 2018, at 22:31, Sam Hathaway wrote:
So sorry for leading you astray with `shuf`. I’ve had GNU Coreutils
installed for so long that I’ve forgotten what’s in stock macOS.
(sorry for the following dumb questions… I've used Linux last time in
So sorry for leading you astray with `shuf`. I’ve had GNU Coreutils
installed for so long that I’ve forgotten what’s in stock macOS.
It sounds like your `sort` is too old to have `-R`.
Jean-Christophe’s Perl solution would probably be easiest at this
point.
Try replacing the contents of
Hi, Jean-Christophe!
sort -R brings this error message:
sort: invalid option -- R
Try `sort --help' for more information.
and sort --help brings this:
--
Vlads27iMac2012:~ Vlad$ sort --help
Usage: sort [OPTION]... [FILE]...
Write sorted concatenation of all FILE(s) to standard output.
Hi, Sam!
Thanks for the explanations & reminder (I think Chris was so nice to
show me this once - because I still have two TextFilters - but I didn't
use it since then and I've forgot :-((()
It seems that shuf is not there, because everything I've got is this
error message:
/Application
shuf requires coreutils which is not in macOS by default. You can install it
with homebrew.
sort -R seems to be available in recent versions of macOS (the man page
indicates a 2015 date).
There is also a solution with Perl as given here:
Make a text filter called Randomize with the contents:
```
#!/bin/sh
exec shuf
```
Text filters go in ~/Library/Application Support/BBEdit/Text Filters. I
think they probably have to be executable. Running these command in
Terminal should do the trick:
```
cd ~/Library/Application\
Hello!
I have a list of difficult words / phrases for my son (see below) that I
want to randomize in order to keep the boy awake :-)
I've found similar (old!) questions:
http://bbedit-talk.barebones.narkive.com/jXrdz0T6/randomize-lines
15 matches
Mail list logo