Closed deleonjavier closed 2 years ago
Is gdate
installed on Mac OS by default? I often forget that I put coreutils on my PATH - I wonder if there's some alternative that will definitely work on a stock system on either OS.
Hey can you reproduce the error that you were having? I tried with /bin/date
on my Mac and it seems to support both of the formats I'm using:
jordan@dorothy:~/GitHub/for-business (build-release-planning-2018-07 % u=)$ /bin/date '+%F %I:%M%p %Z'
2018-07-26 10:04AM CDT
jordan@dorothy:~/GitHub/for-business (build-release-planning-2018-07 % u=)$ /bin/date '+%s'
1532617469
When I use secrets.sh
out of the box
[deleonjavier: (master)@deleonjavier secrets.sh]: secrets list
date: illegal time format
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
javier |
Where my date
command is
DATE(1) BSD General Commands Manual DATE(1)
NAME
date -- display or set date and time
SYNOPSIS
date [-jRu] [-r seconds | filename] [-v [+|-]val[ymwdHMS]] ... [+output_fmt]
date [-jnu] [[[mm]dd]HH]MM[[cc]yy][.ss]
date [-jnRu] -f input_fmt new_date [+output_fmt]
date [-d dst] [-t minutes_west]
I also found this in my .bashrc
commented out.
#PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
where this exists:
date -> ../../bin/gdate
😄 Just cleaning up my opened PRs. Great tool BTW, I still use it. 33
Hey @jordemort,
the
secrets.sh list
command wasn't working for me on my mac. So I added this, so I thought I'd share. 👍