TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: SHOT
from: JAN PANTELTJE
date: 2018-05-01 13:30:00
subject: Re: 64 bit OS

On a sunny day (Tue, 1 May 2018 12:11:30 +0100) it happened Ahem A Rivet's
Shot  wrote in
:

>On Tue, 01 May 2018 09:51:49 GMT
>Jan Panteltje  wrote:
>
>> cat dvd-list.txt | grep movie_name
>> cat dvd-list.txt | grep amovie
>
>        That poor overworked cat :)

Yep, cat is a useful utility.
cat is often used, sometimes not really needed as you can use '<' to read from
a file in many cases.



Just for fun,., using simple tools,
every month around the 22th NASA publishes the space-calendar in sci.space.tech
as a big text file.
In it are a lot of satellite launches, comets,. asteroids, other special days
for the next 12 month,
sort of a shifting window on what happens related to space.

Looking at the April 22 calendar I automatically looked for the 'closest to
earth approach' of asteroids.
as there are lot of those, hundreds, not so easy not to overlook a close one...
So I took the file, filtered out all the near-earth lines:
 cat space_calendar | grep Near-Earth > aq4
aq4 just a scratch file... tha then looks like:
 May 01 - Amor Asteroid 2018 DX3 Near-Earth Flyby (0.081 AU)
  May 03 - Amor Asteroid 2015 JP Near-Earth Flyby (0.097 AU)
..

197 lines.
Then I use the editor macro function to only get the last field, but you could
use 'awk' of course, it then looks like:
0.166
0.097
...

Then I ran that result file through 'sort', a numeric sort, creating a file
with lowest value (is distance to earth in astronomical units) first:
sort -n  aq4 > aq5

Now aq5 looks like:
0.003
0.008
0.010
0.011
0.011
0.013
0.015
0.016
0.017
0.019
0.019
0.019
0.019
0.019
0.019
...

Interesting, 0.003 is the closest encounter, is really close in a way (end
Dinos comes to mind),
Let's grep in the original calendar which one that is:
 grep 0.003 space_calendar
  Mar 04 - Aten Asteroid 2015 EG Near-Earth Flyby (0.003 AU)

That is March 4 next year, wear your tinfoil or hard-hat.

All this shows is that data processing with the simple already available
utilities on your raspberry is EASY and FAST.
If you had to enter those 197 entries into a databeast, and then query it,
pfff.
This took less than 6 minutes, in a terminal.
I think you can even do that in a one liner..

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.