0
So I have been using a command piped through curl (on GNU/Linux's grep utility) to generate a random password string for tightening security on some of my accounts.
curl -s https://www.grc.com/passwords.htm | grep -oP '[a-zA-Z0-9]{63}' | tail -n1 | cut -c1-63
I'm trying to make this command work on a Mac, and seeing as though Mac has the BSD General Utilities being a Unix base, the flags are different. I've referenced the grep man page for the BSD General commands utility, and came across a few flags that appeared they would work, but I can't get it to parse the page correctly. If someone can point me in the right direction, or let me know what I'm missing I would appreciate it.
I have a feeling it's right in front of my face.
The -e
flag seemed like a righteous fit, but it is not working either.
-e pattern, --regexp=pattern
Specify a pattern used during the search of the input: an input line is selected if it matches any of the specified patterns. This option is most useful when multiple -e options are used to specify multiple patterns, or when a pattern begins with a dash ('-').
Thank You very much for the reply, and it makes much sense. – shome_slice – 2016-01-24T04:08:35.573
@shome_slice If my solution worked for you, you can click the checkmark outline next to my answer to mark it as "accepted", so people know this question has been resolved. – Spiff – 2016-01-25T20:09:37.527