Shell script collection
| NAME | DESCRIPTION |
|---|---|
| PMWMT/ | Scrapes from Poor Man's Webmaster Tools by the Silly Software Company |
| markets/ | Scripts related to financial and cryptocurrency markets |
| ala.sh | Arch Linux Archives (aka ALA) explorer |
| aur.sh | List and search for packages from AUR |
| bcalc.sh | Simple wrapper for Bash Bc and Zsh maths that keeps a record of results |
| bcalc_ext.bc | Catenated extensions for bash bc bcalc.sh, see also the individual extensions |
| chatgpt.sh | Shell wrapper for ChatGPT (go to the stand-alone GitLab repo or GitHub repo) |
| ctemp.sh | Convert amongst temperature units (Celsius, Fahrenheit, and Kelvin) |
| datediff.sh | Small shell function library to calculate time ranges in different units (go to its GitLab repo or GitHub repo). |
| faster_sh.txt | Really good tips for improving script performance (from David Butcher) |
| geoconv.sh | Convert geocoordinates to various formats |
| grep.sh | Grep files with shell built-ins |
| inmet.sh | Get satellite images from Brazilian Instituto Nacional de Meteorologia |
| ipmet.sh | Get rain radar images from Brazilian IPMET/SIMEPAR institutes |
| md2man.sh | Generate man pages from a pandoc markdown file |
| moon-illumination.py | Calculate lunar illuminated fraction |
| ul.sh | Generate html lists from URLs |
| urlgrep.sh | Grep full-text content from URL list |
| wc.sh | Print line, word and character count for files with shell built-ins |
| wf.sh | Weather forecast from the Norway Meteorological Institute |
Some scripts that wrap around online APIs or other resources may not be updated as my personal use cases may have changed over time.
Scripts grep.sh and wc.sh were written as coding exercises and are not meant to be further developed or perfected.
| NAME | DESCRIPTION |
|---|---|
| binfo.sh | Blockchain explorer for bitcoin with <blockchain.info> and <blockchair.com> public APIs |
| bitcoin.blk.sh | Bitcoin block and blockchain information (local node) |
| bitcoin.hx.sh | Create base58 address types from public key and WIF from private keys |
| bitcoin.tx.sh | Parse transactions by hash or transaction json data (local node) |
| blockchair.btcoutputs.sh | Download blockchair output dump files systematically |
| zzz.bitcoin.parsedTxs.txt | Example of parsed transactions by bitcoin.tx.sh |
Scripts bitcoin.tx.sh (transaction-centered) and bitcoin.blk.sh (block-centered)
warp about bitcoin-cli (bitcoind local node) to parse data.
General directions include fully synchronising the blockchain
with bitcoin-daemon for them to work as expected ™, and
have bitcoind set with transaction indexes (option txindex=1),
otherwise block id hash needs to be supplied manually in order
to retrieve transaction and vin list.
Transaction parsing time depends on the number of vins and vouts. Parsing a few hundred or thousand transactions seems quite feasible for personal use.
However, do note that I haven't really used these much over some time. There are no plans on updating them any longer either.
Some of Grondilu's bitcoin-bash-tools functions are embedded in these scripts.
| NAME | DESCRIPTION |
|---|---|
| binance.sh | Binance public API, crypto converter, prices, book depth, coin ticker |
| bitstamp.sh | Live price stream from Bitstamp API |
| cgk.sh | CoinGecko public API, convert one crypto, bank/fiat currency or metal into any other, market ticker, cryptocurrency ticker. This is my favorite everyday-use script for all-currency rates! |
| cmc.sh | CoinMarketCap convert any amount of one crypto, bank/fiat currency or metal into any other, requires (free) API key |
| uol.sh | Fetches rates from UOL service provider public API. Puxa dados de páginas da API pública do UOL Economia |
| whalealert.sh | Data from <whale-alert.io> free API with the latest whale transactions |
Check script help pages with option -h.
Veja as páginas de ajuda dos scripts com a opção -h.
Some scripts require API keys. Please create free API keys and set environment variables holding them according to the help pages.
These scripts can run under Termux, however some of them need a web socket such as websocat.
Packages websocat and C-code datediff are available in the Termux repo as of now.
After installing zsh, it is possible to make it behave like ksh:
ln -s $PREFIX/bin/zsh $PREFIX/bin/ksh
For the real deal, though, you'll want McDutchie's Ksh93+um.
To build it correctly, you need the clang, binutils, getconf, and
ncurses-utils packages (details).
Vi's websocat binaries for Android (ARM), MacOS and FreeBSD can be downloaded from here.
Hroptatyr's dateutils can be compiled in Termux.
I suggest installing the following packages before trying to build dateutils
as per developer instructions.
pkg install gperf flex bison python python2 cmake automake libtool build-essential binutils ctags
In general, if needed, check that $TMPD is set properly (should be set automatically),
review source code for /tmp directory references and change to a hard location under
Termux $PREFIX or even set something like $PREFIX/tmp in the build shell scripts.
If any dependency software is not in the official repos and you cannot compile it from source, try to look for compiled and officially distributed binaries for your platform.
Grondilu's bitcoin-bash-tools.
Kristapsk's bitcoin scripts.
Alexander Epstein's currency_bash-snipet.sh.
MiguelMota's Cointop for crypto currency tickers.
8go's CoinBash.sh for CoinMarketCap simple tickers.
Brandleesee's Mop: track stocks the hacker way.
C-code packages units and qalc (qalculate) also provide bank currency
rate conversion.
Fig. 1 — Silly Software Company Logo (see PMWMT/ and lore)