Shell scripts (Wordhole)

From XPUB & Lens-Based wiki
Revision as of 16:50, 1 November 2023 by Riviera (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Throughout SI #22: Radio Worm - Protocols for an Active Archive, several shell scripts have been made. These are small computer programmes which enhance productivity and make tasks less repetitive. On several occasions we have implemented shell scripts to get things done and probably we will use shell scripts again in the near future. In 'Tools to Fight Boredom: FLOSS and GNU/Linux for artists working in the field of generative music and software art' Marloes de Valk likens shell scripts to a sort of 'glue' capable of binding things together. Throughout SI #22 shell scripts have been used to diverse ends. This ranges from making a podcast generator to downloading files from the internet. From compiling pdf documents with pandoc and weasyprint to manipulating texts with grep, awk and sed. These scripts can be found on the internet via Gitea, on the Wiki and in etherpads. Overall, shell scripting has been more of a distributive practice than a collaborative practice. We have shared algorithms with each other without necessarily writing those algorithms together (i.e. in an Etherpad). Depending on how the shell script is written, a specific shell may or may not be required to execute the code. Primarily we have been using bash, the Bourne Again Shell, and fish, the Friendly Interactive Shell. These shells have subtle differences in syntax; bash often cannot execute fish scripts and vice-versa. Below is an example of a fish script which, when executed, downloads all episodes of the Laurence Rassel Show.

#! /usr/bin/fish
for n in 01 02 03 04 05 06 07 08 09 (seq 10 17);
    wget (printf 'http://www.publicrec.org/archive/2-01/2-01-014/2-01-014-%s.mp3' $n);
end