mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2020-02-11, 20:33   #1
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

164558 Posts
Default CLI tricks

There are lots of cool command-line tricks.

Maybe post one in this thread.

Here is an interesting use for curl:
Code:
$ curl wttr.in/Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
Weather report: Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch

    \  /       Partly cloudy
  _ /"".-.     30..+41 °F
    \_(   ).   → 27 mph
    /(___(__)  6 mi
               0.0 in
                                                       ┌─────────────┐
┌──────────────────────────────┬───────────────────────┤  Tue 11 Feb ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│  _`/"".-.     Moderate or he…│  _`/"".-.     Light sleet sh…│  _`/"".-.     Light sleet sh…│      .-.      Patchy sleet p…│
│   ,\_(   ).   26..+39 °F     │   ,\_(   ).   28..+41 °F     │   ,\_(   ).   26..+39 °F     │     (   ).    26..+39 °F     │
│    /(___(__)  → 27-41 mph    │    /(___(__)  → 31-44 mph    │    /(___(__)  → 26-42 mph    │    (___(__)   → 24-38 mph    │
│     * * * *   4 mi           │      ‘ * ‘ *  6 mi           │      ‘ * ‘ *  6 mi           │     ‘ * ‘ *   5 mi           │
│    * * * *    0.0 in | 99%   │     * ‘ * ‘   0.1 in | 72%   │     * ‘ * ‘   0.0 in | 88%   │    * ‘ * ‘    0.0 in | 69%   │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐
┌──────────────────────────────┬───────────────────────┤  Wed 12 Feb ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│  _`/"".-.     Moderate or he…│      .-.      Patchy sleet p…│    \  /       Partly cloudy  │    \  /       Partly cloudy  │
│   ,\_(   ).   28..+37 °F     │     (   ).    32..41 °F      │  _ /"".-.     30..+37 °F     │  _ /"".-.     28..+35 °F     │
│    /(___(__)  → 16-26 mph    │    (___(__)   → 18-24 mph    │    \_(   ).   ↑ 8-16 mph     │    \_(   ).   ↖ 9-16 mph     │
│     * * * *   4 mi           │     ‘ * ‘ *   5 mi           │    /(___(__)  6 mi           │    /(___(__)  6 mi           │
│    * * * *    0.0 in | 63%   │    * ‘ * ‘    0.0 in | 88%   │               0.0 in | 0%    │               0.0 in | 0%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐
┌──────────────────────────────┬───────────────────────┤  Thu 13 Feb ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│  _`/"".-.     Light rain sho…│  _`/"".-.     Light rain sho…│  _`/"".-.     Light rain sho…│  _`/"".-.     Patchy rain po…│
│   ,\_(   ).   35..41 °F      │   ,\_(   ).   41..44 °F      │   ,\_(   ).   35..41 °F      │   ,\_(   ).   33..37 °F      │
│    /(___(__)  ↑ 6-10 mph     │    /(___(__)  ↓ 6-9 mph      │    /(___(__)  ↓ 8-13 mph     │    /(___(__)  ↓ 4-9 mph      │
│      ‘ ‘ ‘ ‘  6 mi           │      ‘ ‘ ‘ ‘  6 mi           │      ‘ ‘ ‘ ‘  6 mi           │      ‘ ‘ ‘ ‘  6 mi           │
│     ‘ ‘ ‘ ‘   0.0 in | 76%   │     ‘ ‘ ‘ ‘   0.1 in | 89%   │     ‘ ‘ ‘ ‘   0.0 in | 83%   │     ‘ ‘ ‘ ‘   0.0 in | 87%   │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
Location: Llanfairpwllgwyngyll, Isle of Anglesey, Wales, LL61, UK [53.2213252,-4.208335]
Check out the attached image for the color version.

Attached Thumbnails
Click image for larger version

Name:	weather.png
Views:	62
Size:	49.5 KB
ID:	21764  
Xyzzy is offline   Reply With Quote
Old 2020-02-11, 21:05   #2
xilman
Bamboozled!
 
xilman's Avatar
 
May 2003
Down not across

231778 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
There are lots of cool command-line tricks.

Maybe post one in this thread.

Here is an interesting use for curl
That is really cute!



It relies on an external source of information --- nothing wrong with that --- but entirely self-hosted examples have a certain cachet. I will try to dig up a few.

telnet towel.blinkenlights.nl still works, some thirty years after I first discovered it.
xilman is offline   Reply With Quote
Old 2020-02-11, 21:26   #3
xilman
Bamboozled!
 
xilman's Avatar
 
May 2003
Down not across

231778 Posts
Default

Quote:
Originally Posted by xilman View Post
That is really cute!



It relies on an external source of information --- nothing wrong with that --- but entirely self-hosted examples have a certain cachet. I will try to dig up a few.

telnet towel.blinkenlights.nl still works, some thirty years after I first discovered it.
OK, I did a little research. Finding the source of the material below is left as an exercise for the reader.

If you have a Ubuntu or Debian system, try apt-get moo. No guarantee it works but it does on the machine on which I am typing.

If at first you don't succeed, try successively aptitude -v moo, aptitude -vv moo , aptitude -vvv moo , aptitude -vvvv moo aptitude -vvvvv moo through to aptitude -vvvvvv moo

This one I saw some years ago but had long forgot the details.

I occasionally type sl when I meant ls. Try running "sudo apt-get install sl" (use yum on RedHat-derived distros) to ensure that sl works properly.

This last is completely new to me.
xilman is offline   Reply With Quote
Old 2020-02-11, 21:43   #4
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

10100110000002 Posts
Default

There are a bunch of sites that have lists of these.

Here is one.
https://www.tecmint.com/20-funny-com...n-in-terminal/
retina is offline   Reply With Quote
Old 2020-02-11, 22:04   #5
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

171538 Posts
Default

Quote:
Originally Posted by retina View Post
Is that site compatible with Lynx?
Uncwilly is offline   Reply With Quote
Old 2020-02-11, 22:14   #6
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

26×83 Posts
Default

Quote:
Originally Posted by Uncwilly View Post
Is that site compatible with Lynx?
Dunno. Just use wget and curl instead.
retina is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
PARI/GP tips and tricks CRGreathouse PARI/GP 40 2018-02-15 18:20
Card Tricks davar55 Hobbies 11 2013-05-27 14:28
How To Evaluate SNFS Polynomial Tricks? wblipp Factoring 4 2011-04-15 16:22

All times are UTC. The time now is 08:13.

Tue Apr 7 08:13:01 UTC 2020 up 13 days, 5:46, 2 users, load averages: 1.57, 2.01, 1.98

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.