Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Random Days - Bash One-Liner

28 views
Skip to first unread message

Farley Flud

unread,
Feb 16, 2024, 5:01:18 PMFeb 16
to
Hey dumb fucks. You want random days? I'll give you random
days with one fucking line of bash code:

# /bin/bash
shuf -n200 -i$(date -d '1970-01-01' '+%s')-$(date -d '2024-02-16' '+%s') \
| xargs -I{} date -d '@{}' '+%d/%m/%Y'

Output shown below.

Note: For dates before the Unix epoch it needs some tweaking, but
I'll allow you dumb shits to figure it out.

Ahahahahahahahahahahahahahahahahahahahahaha!

GNU/Linux: designed for supermen.

Microslop Winblows: designed for crippled pussies.

Promised output:

09/12/1998
07/01/1989
21/09/1979
17/03/1987
02/04/1976
20/07/2023
28/02/1985
26/03/1984
17/03/1988
12/07/2009
02/07/1992
13/12/2023
23/02/2016
16/03/1972
18/12/2010
15/06/2005
28/09/1988
21/12/1999
31/08/2008
29/05/2014
05/08/2004
26/12/2006
10/09/2022
02/11/1999
01/02/1988
31/01/1971
22/05/1986
02/01/1992
20/05/1992
18/09/2007
30/12/1985
29/08/2022
21/04/2015
26/03/1981
11/02/2010
01/08/2016
15/05/1990
24/10/1991
16/03/1983
21/12/1999
25/03/1988
18/12/2021
14/03/2007
30/05/1993
15/07/1980
09/03/2020
28/12/2014
14/04/1976
23/02/1992
22/08/1989
09/05/1970
19/12/1995
16/06/1972
08/11/2012
03/08/2020
12/07/1986
05/10/1974
10/02/1991
13/11/2000
20/07/2014
08/01/1980
07/06/2006
11/11/1971
24/04/1989
03/01/1980
21/08/2004
09/06/1976
12/04/2001
11/06/2023
28/01/2024
02/07/1971
03/08/2018
19/03/2012
22/02/2010
08/07/1996
09/03/2012
13/05/2019
16/11/2003
19/02/1992
18/02/1973
02/12/1974
26/05/1999
28/08/2023
12/03/2001
26/02/2008
16/04/1997
26/02/2023
21/04/2019
02/03/1978
01/11/1997
12/01/1987
24/06/1993
11/07/1980
21/04/1975
11/05/2012
08/11/1984
18/01/1995
11/01/1990
25/04/1995
25/03/2009
19/06/2017
18/08/1982
19/12/2009
29/03/1980
31/05/2019
24/06/1999
20/08/2000
28/03/2012
23/12/1974
02/02/1975
06/03/1982
01/04/1999
18/08/1977
20/04/2004
25/07/1998
27/07/1997
27/03/1993
01/12/1972
31/05/2016
23/12/2014
22/04/2016
08/06/2016
21/10/1983
10/03/1997
09/11/1990
21/10/1994
29/12/1984
29/06/1993
21/10/1985
17/10/1975
15/01/1976
24/09/1994
18/08/1972
02/01/2005
18/03/1970
28/08/2011
31/10/1984
26/05/1987
19/10/1973
10/07/1976
26/11/2015
02/01/1986
14/01/1983
08/07/1994
24/09/1970
07/10/2014
30/05/2014
17/08/1986
13/08/2011
22/03/2016
20/02/2003
14/03/1989
01/02/1971
12/08/1973
27/03/2008
03/05/1970
03/01/1987
26/08/1993
19/11/2008
03/04/1986
07/08/2000
03/10/2016
15/09/2012
06/10/1970
09/05/1982
25/07/2023
18/12/2011
21/06/1973
07/09/1976
19/03/1974
11/09/2012
02/03/2021
25/08/2014
03/10/1980
23/12/2007
04/03/1984
16/09/1990
18/01/2011
30/11/1982
26/04/1990
20/10/1973
28/05/1978
07/01/1995
30/09/2000
21/06/2015
23/09/1973
24/11/2022
08/11/2005
05/01/1982
21/10/2023
01/06/2000
17/08/2001
04/01/1971
14/08/1978
17/09/1994
20/03/1975
19/08/1992
07/03/1974
14/06/1991
11/05/2003

DFS

unread,
Feb 17, 2024, 7:24:09 AMFeb 17
to
On 2/16/2024 5:01 PM, Lameass Larry Piet wrote:

> Hey dumb fucks. You want random days? I'll give you random
> days with one fucking line of bash code:
>
> # /bin/bash
> shuf -n200 -i$(date -d '1970-01-01' '+%s')-$(date -d '2024-02-16' '+%s') \
> | xargs -I{} date -d '@{}' '+%d/%m/%Y'


The Feeb innovation and creativity never ceases to amaze...



> Output shown below.
>
> Note: For dates before the Unix epoch it needs some tweaking, but
> I'll allow you dumb shits to figure it out.


Fix your shit-code yourself.



> Ahahahahahahahahahahahahahahahahahahahahaha!
>
> GNU/Linux: designed for supermen.
>
> Microslop Winblows: designed for crippled pussies.


1 line of intuitive Microsoft PowerShell makes mincemeat of your clumsy,
unreadable GuhNoo bash:

$b=[DateTime]"1960-01-01"; $e=[DateTime]"2024-12-31"; $cnt=1; $dates =
1000; while($cnt-le $dates) {$rdate = [DateTime](Get-Random -Minimum
$b.Ticks -Maximum $e.Ticks); $rdate.ToString("yyyy-MM-dd"); $cnt++;}

No tweaking necessary to handle an "epoch", of course.



To output the randoms in sorted order:

$b=[DateTime]"1960-01-01";$e=[DateTime]"2024-12-31";$cnt=1;$dates=1000;$arr=@();while($cnt-le
$dates) {$rdate = [DateTime](Get-Random -Minimum $b.Ticks -Maximum
$e.Ticks);$arr+=$rdate.ToString("yyyy-MM-dd");$cnt++;} $arr|Sort-Object;


bash severely pwned by PowerShell

rbowman

unread,
Feb 17, 2024, 12:49:12 PMFeb 17
to
On Sat, 17 Feb 2024 07:24:05 -0500, DFS wrote:

> 1 line of intuitive Microsoft PowerShell makes mincemeat of your clumsy,
> unreadable GuhNoo bash:

https://betanews.com/2024/02/16/windows-11-users-complain-of-taskbar-
start-menu-and-performance-issues-with-kb5034765-update/

Assuming you can get to PowerShell after the last 'fix'.

Relf

unread,
Feb 17, 2024, 1:35:00 PMFeb 17
to
You (rBowman) replied ( to DFS ):
> Assuming you can get to PowerShell [ using the latest StartMenu ].

DFS doesn't need no stinking StartMenu.
It's been years since I last saw it.

Also, My desktop is pure black; I use folders instead; to wit:

Jeff-Relf.Me/Relfs-File-Explorer.PNG

Joel

unread,
Feb 17, 2024, 1:45:48 PMFeb 17
to
I really cannot understand what makes you tick, Jeff.

--
Joel W. Crump

Amendment XIV
Section 1.

[...] No state shall make or enforce any law which shall
abridge the privileges or immunities of citizens of the
United States; nor shall any state deprive any person of
life, liberty, or property, without due process of law;
nor deny to any person within its jurisdiction the equal
protection of the laws.

Dobbs rewrites this, it is invalid precedent. States are
liable for denying needed abortions, e.g. TX.

Chris Ahlstrom

unread,
Feb 17, 2024, 2:02:03 PMFeb 17
to
rbowman wrote this copyrighted missive and expects royalties:
I couldn't get used to the PowerShell verb-qualifier notation. And that's
ignoring the convenience of having human readable objects.

I'm sure it's great, but I've always gotten by quite handily with
BAT and Bash scripts.

--
You will be traveling and coming into a fortune.

Lawrence D'Oliveiro

unread,
Feb 17, 2024, 7:18:31 PMFeb 17
to
On Sat, 17 Feb 2024 07:24:05 -0500, DFS wrote:

> 1 line of intuitive Microsoft PowerShell makes mincemeat of your clumsy,
> unreadable GuhNoo bash:
>
> $b=[DateTime]"1960-01-01"; $e=[DateTime]"2024-12-31"; $cnt=1; $dates =
> 1000; while($cnt-le $dates) {$rdate = [DateTime](Get-Random -Minimum
> $b.Ticks -Maximum $e.Ticks); $rdate.ToString("yyyy-MM-dd"); $cnt++;}

Interesting. That has spilled over onto 3 lines for me.

Physfitfreak

unread,
Feb 17, 2024, 8:13:30 PMFeb 17
to
Plot it so it can be visually inspected.

--
This email has been checked for viruses by Avast antivirus software.
www.avast.com

DFS

unread,
Feb 20, 2024, 9:23:01 AMFeb 20
to
https://imgur.com/xCkc515

Perhaps you need a wider monitor...

DFS

unread,
Feb 20, 2024, 9:23:36 AMFeb 20
to
On 2/17/2024 1:34 PM, Relf wrote:
> You (rBowman) replied ( to DFS ):
>> Assuming you can get to PowerShell [ using the latest StartMenu ].
>
> DFS doesn't need no stinking StartMenu.

I use it occasionally, mostly to access Settings or Control Panel.


> It's been years since I last saw it.
>
> Also, My desktop is pure black; I use folders instead; to wit:
>
> Jeff-Relf.Me/Relfs-File-Explorer.PNG


Yours is the first and only homegrown Windows desktop I've ever seen.

It's not a skin or a theme. It's a replacement for Windows Explorer, right?

Relf

unread,
Feb 20, 2024, 10:21:47 AMFeb 20
to
You (DFS) replied ( to me ):
> > My desktop is pure black; I use folders instead; to wit:
> > Jeff-Relf.Me/Relfs-File-Explorer.PNG
>
> It's not a skin or a theme.
> It's a replacement for Windows Explorer, right ?

It's a (HighContrast) Theme: Jeff-Relf.Me/Black.Theme.TXT

; Reboot twice ? From: Jeff-Relf.Me/Win10.REG.TXT"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"Segoe UI"="Comic Sans MS"
"Segoe UI Bold"="Comic Sans MS Bold"
"Segoe UI Bold Italic"="Comic Sans MS Bold Italic"

My 4k monitor is 140 dpi, so most apps
( like Google Chrome, FireFox & Microsoft File Explorer ) are scaled 225 %;
my apps ignore that setting via "SetProcessDPIAware()".

My browsers still have access to each and every pixel;
i.e. images are properly zoomed, not pixelated.

Lawrence D'Oliveiro

unread,
Feb 20, 2024, 6:18:53 PMFeb 20
to
On Tue, 20 Feb 2024 09:22:56 -0500, DFS wrote:

> Perhaps you need a wider monitor...

The fact that your “one-liner” was longer than the original “one-liner”
suggests to me that you need a better ruler. Or an eye test.
0 new messages