linux #!/bin/bash

linux scripts  

Utilities for Hams

... and more

W3DHJ  >>  Linux programs
~~~~    ~~~~
I can be a little slow on the uptake. After I do a 'thing' a hundred times or so, I finally say to myself: "Hey! I bet I can automate and simplify that!"

So, that's what you'll find here: A few *nix scripts that I wrote to help me do 'tasks'. And, often these tasks used to involve firing up a browser and wading past a lot of dancing elephants and flying pigs to get at a single piece of information.

There's nothing very fancy nor showy here. KISS is my programming mantra. If you're already an experienced linux user, you could probably crank out much of this stuff faster (and prettier) than it will take for you to read this web page and download the script.

In general, I try to make my shell scripts cross-platform compliant between linux and FreeBSD - the two shell systems I actively use. I employ a shebang line in the scripts of [ #!/usr/bin/env bash    ] -- which should work in nearly all cases. If not, you will need to change to a shebang line ala [ #!/bin/bash ] , or the like, to match the bash shell location on your machine [ which bash ].  Oh, did I mention that the shell scripts were written to run in bash? If you insist on using a different shell, it's up to you to 'correct' any bash'isms that may/probably exist in the scripts.

Download the file(s) into a "work" directory -- doing a "Save As" if using a browser, or by using a specially crafted [ wget -U W3DHJ https://.....  ]  with the "Download xxxx.xx here" URL as given.  (My web host disallows the use of wget and curl with their default user-agents.)

All the the single file scripts are compressed with gzip. Decompress the file [ gzip -d filename.gz ] -- and copy the script into your $HOME/bin/ directory [ cp filename ~/bin ]. Don't forget to set the executable bit: [ chmod 700 ~/bin/filename ]. Read the the first 50 or so lines of comments at the top of each program for more details.

The multi-file scripts are tar-gzipped. Download the xxxx.tar.gz file and extract the files with tar [ tar -xvf filename.tar.gz ]. Move into the sub-directory that tar creates and review the README file for the installation instructions.

Several of these scripts are designed to run as click-able objects on your desktop. Since I have no idea what window manager you're running ( trinity, kde, gnome, xfce4, icewm, fluxbox, etc. ), you are on your own in setting that up. Most often it's a right-click-on-the-desktop action, and then select the 'create' option...

Feel free to modify and adapt these scripts to your own personal needs. Perhaps they might prompt an approach to solving some similar problem(s). I would be happy to get reports on such (re)work. Attribution will be given if any of your work is merged into these scripts. In any case, feedback is welcomed. Report problems to my email at the bottom of this page.

Legalese:
These scripts and programs are free software: you can redistribute them and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

These programs are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should grab a copy of the GNU General Public License along with any program you download from here.

Caveat:
Most of these scripts rely on the format and content of information elsewhere on the web. As well, they depend on the specifications of unique, external URLs. If that changes, the script will break. Fix it yourself, or come back here and see if I've fixed it and re-posted the script.

~~~~    ~~~~

call

`call` script This is a script to fetch the name, address, and license details for a given US callsign from a copy of the FCC database at https://callook.info - maintained by Josh Dick, W1JDD.
   
To run it, either enter  call  or  call <callsign>  at the command prompt. The script returns the address information and prompts for another callsign. Enter more callsigns - one per fetch, or exit with "73", "qrt", "quit", or "exit".

To pull just one address and be done with it, enter  call <callsign> 1  on the command line.

Download call(.gz) here.


~~~~    ~~~~

qth

`qth` script This is a script to fetch just the address for a given US callsign from a copy of the FCC database at https://callook.info - maintained by Josh Dick, W1JDD,
    -or-
a given Canadian callsign from a daily refreshed copy of the Canadian Amateur callsign database..

Useful for the times you are making out QSL cards. (You do QSL, don't you?)

To run it, either enter  qth  or  qth <callsign>   at the command prompt. The script returns the address information and prompts for another callsign. Enter more callsigns - one per fetch, or exit with "73", "qrt", "quit", or "exit".

To pull just one address and be done with it, enter  qth <callsign> 1  on the command line.

Download qth(.gz) here.

~~~~    ~~~~

grid

`grid` script This is a script to fetch the grid square for a given callsign. Usually, but not always, the grid is determined by the license address in the FCC database. (Caveat: A P.O. Box address could result in a grid different from the actual QTH. As well, the grid information at QRZ.com can be changed by  the license holder.) Some DX callsigns are listed, and those grid square values (if any) will have been entered by hand.

To run it, either enter  grid  or  grid <callsign>  at the command prompt. The script returns the grid information and prompts for another callsign. Enter more callsigns - one per fetch, or exit with "73", "qrt", "quit", or "exit".

To pull just one grid square and be done with it, enter  grid <callsign> 1  on the command line.

As written (by design) it only supports the format of US/'VE'/'XE' callsigns -- or, others of that style. It will not handle something like: VE4/W3DHJ or 4W3DHJ.

Download grid(.gz) here.

~~~~    ~~~~

au_kp.sh

This is a trivial script that's designed to be executed as a 'click-able' object on the desktop. The actual images produced by the script are approximately 30% larger than shown here.

NOAA Aurora plot The AURORA - 30 MINUTE FORECAST is fetched from the NOAA web site , re-sized, and displayed using ImageMagick's `display` program.

Those of you on the upside-down half of the planet will probably want to select the "australis" image from the NOAA web site. HI!HI!

Current Kp The Kp information is pulled from the GFZ Space Weather web site.

The current Kp and the previous 3-hour sets of Kp are shown in the first image. A new image will start at 0000 UTC.

Kp forecast The Kp forecast for the next 72 hours is shown in the second image.
The image is updated every three hours.

As a Weak Signal VHF Operator, I like to keep track of the 'space weather' and not miss anything that might affect propagation while I am otherwise slaving away at my computer keyboard. The Kp information could be especially 'interesting' around the sunspot cycle's peak -- if we ever see a peak again...

What you will be served is a set of static displays. I.e., you will need to re-run the script every so often to see updated information.

<digression>
I use this same technique in a script that pops up 4-5 different web cam displays from around Pueblo, and in another script that pops up several regional weather radar images. Helps me stay connected with the outside world... HI!HI!
</digression>

31-Jul-20: Replacing old au_xray.sh script due to loss of static Solar Xray chart.

Download au_kp.sh(.gz) here.

~~~~    ~~~~

fortune

This is not a command line, nor a shell script.
What I offer here is a PHP/web page `fortune` implementation, consisting of:
If you are unaware or unfamiliar with `fortune`, see the Wikipedia article for an overview.

Examples implementing this package, are below -- showing selections from each of the fortune files, and, lastly, the more encompassing example of selection one fortune from among all the fortune files in a directory.
You can view the source of this web page to see how the resulting embedding looks.
Ham Humor & Wisdom
At Field Day I grabbed an antenna while it was in use.
Boy! That hertz!
Ham Humor has 352 entries.
VHF Rover Humor & Wisdom
A Rover's experience correlates directly with equipment ruined.
Rover Humor has 223 entries.
Wisdom
If you're coasting, you're going downhill.
Wisdom has 499 entries.
Humor 1-2-liners
Bad news!
Something that happened in Vegas was spotted in Newark
Humor has 15041 entries.
Science-Technology-Engineering-Math
I don't know why I should have to learn Algebra…
I'm never likely to go there.
STEM has 1844 entries.
Why, oh Why?
Why do smoke alarm batteries only die in the middle of the night?
Why, oh Why has 172 entries.
Calvin & Hobbes
When your aliments sound cute, you don't get much sympathy.
-- Calvin After telling his mom, "I've got a big owwy boo boo on my pinky"
Calvin has 297 entries.
Quotes & Pithy Aphorisms
We work to become, not to acquire.
-- Elbert Hubbard
Quotes has 2516 entries.
A random fortune from among all the files
Oxymoron: Reality TV
There are a total of 20944 entries within the fortune files.
Reloading this web page ought to show you new, randomly selected fortunes.
One distinction in all these fortune files is I have embedded HTML code in some of the text to display bold, underlined, Italicized, etc. words and phrases. Thus, these fortune files play nice on a web page, but would be inappropriate in a pure text environment. But, you are free to take them and rework them for simple text display -- such as in an email .sig.

Download W3DHJ_Ham_fortune-2026-05-01.tar.gz here.

DO NOT bookmark the URL above; it will just go "404" whenever I refresh the fortune files.
Bookmark this, instead.
My intention is to refresh the download file around the first of each month.
The filename above will change each time I update the package -- using the date of the most recent upload. The actual changes could be anything from minor changes in phrasing (or spelling - heh...) to the wholesale addition of new content. (Plus I like to mess with the search engines.)

~~~~    ~~~~

MORE...

Real Soon Now.

If you have a "need" and if you are programming averse, suggest it to me. If you see a "need" and if I see it as "interesting", I just may take a crack at it.
~~~~    ~~~~
W3DHJ Home W3DHJ Home W3DHJHome Page.

 
Constructive comments and/or discussions:
email graphic for W3DHJ
Last updated: 01-Aug-23 -- Now "Mobile Friendly"