
Hosted by Hacker Public Radio · EN

This show has been flagged as Clean by the host. This series is dedicated to exploring little-known—and occasionally useful—trinkets lurking in the dusty corners of UNIX-like operating systems. Hopefully it doesn't seem like I'm picking on Linux Journal , but like UNIX Curio #1 (HPR4587), this column has been inspired by an article of theirs 1 . The author was demonstrating a clever bash script that would take a filename and send the file to standard output or, if the filename ended in .gz, decompress it and send the result to standard output. Slightly rearranged, he had: F=`echo $1 | perl -pe 's/\.gz$//'` if [[ -f $F ]] ; then cat $F elif [[ -f $F.gz ]] ; then gunzip -c $F fi He took some heat on the web site and in letters to the magazine for cranking up a whole Perl interpreter just to chop the .gz off the end of a filename. Our curio for today is a standard UNIX utility made for just this purpose called basename 2 . Along with its brother dirname 3 , it is used to pull apart pathnames to get the part you want. What basename does is remove any leading path on the name given to it, and if a suffix is specified as well, removes that also. If a directory path with a trailing slash is given, it returns the last part with no slashes. Here are some examples: $ basename /bin/gzip gzip $ basename /bin/gzip .so gzip $ basename /usr/lib/libz.so .so libz $ basename /usr/lib/ lib The counterpart, dirname , does essentially the opposite. It removes the last part of the pathname and returns a directory name (with no trailing slash): $ dirname /usr/lib/libz.so /usr/lib $ dirname /usr/lib/ /usr $ dirname file_in_this_dir . So we can replace the first line of the script up top with F=`dirname $1`/`basename $1 .gz` , get the same result, and be sure it will work on any UNIX-like system, no Perl necessary. The more observant among you may be thinking " sed could do that, too!" and you're right; F=`echo $1 | sed 's/\.gz$//'` also would work anywhere. One might suspect that as a general-purpose text processor, sed would be slower than basename and dirname . To see how they compared, we ran each method against a randomly-generated list of 5,000 filenames. Turns out the critics were right, as Perl ran the longest at 59 seconds. Using basename / dirname took 44 seconds—a nice improvement, but sed blew past it at 34 seconds. Probably the fact that only one call to sed was needed versus two for basename and dirname made the difference. Helpful suggestions in response to the article revealed a shell curio. You may have seen the brace syntax for parameters. For example, to show a filename $F with an "X" appended, you can't use echo $FX because that means a parameter named FX . Instead, you'd use echo ${F}X and the shell only interprets what's inside the braces as the parameter name. Modifiers can also go inside the braces 4 and one of these, %, is just what we need to chop off that extension. This works in bash , zsh , and any shell conforming to the current POSIX standard, but not csh and friends or older implementations of the Bourne shell. We can rewrite the first line of the original script as simply F=${1%.gz} and forgo any outside utilities. Performance? Under half a second to process those 5,000 filenames. Not bad at all. References: Treating Compressed and Uncompressed Data Sources the Same https://www.linuxjournal.com/content/treating-compressed-and-uncompressed-data-sources-same Basename specification https://pubs.opengroup.org/onlinepubs/009695399/utilities/basename.html Dirname specification https://pubs.opengroup.org/onlinepubs/009695399/utilities/dirname.html Shell Command Language: Parameter Expansion https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_02 This article was originally written in July 2010. The podcast episode was recorded in March 2026. Provide feedback on this episode.

This show has been flagged as Explicit by the host. It all started at Flanders Technology International in 1987... a tech expo where an eleven-year-old watched a wooden block move across a desk and an arrow follow it on screen. That was it. That was the moment. He had to have a computer with a mouse. What followed was a story of after-school showroom squatting, summer jobs, game piracy, a modem bill that nearly gave his parents a heart attack, and an education in computing that no school could have provided. From the Amstrad PC1512 and the GEM windowing system, to the Schneider Euro PC with its infamous Turbo button that turned Ms. Pac-Man into a half-second blur — this episode is a love letter to the glorious chaos of home computing in the late 1980s. Along the way: the satisfying clatter of a matrix printer , the dark arts of config.sys and autoexec.bat , Digger , the allure of the Commodore 64 , forbidden floppy disks at computer club, a 2400-baud modem, and the very first taste of online community — long before anyone called it the internet. The computers Amstrad PC1512 — the showroom machine that started it all Schneider Euro PC — the computer-in-a-keyboard with the infamous Turbo button Commodore 64 — legendary sounds, legendary forbidden floppy disks Play the games Digger — play in your browser Ms. Pac-Man — play in your browser Samantha Fox Strip Poker (C64) Leisure Suit Larry — Looking for Love in All the Wrong Places — play in your browser Provide feedback on this episode.

This show has been flagged as Clean by the host. Some tips on how the text you write can be improved. With the pestilence of AI spreading out over the once-human internet, doing what LLMs don't is a pretty good starting point to improve one's own writing. Make mistakes. Edit yourself. Avoid the tics that are dangerously close to becoming the norm. See this Wikipedia page, aimed at editors of user submissions: https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing The sections on content, language & grammar, and style are particularly relevant. Provide feedback on this episode.

This show has been flagged as Clean by the host. This series is dedicated to exploring little-known—and occasionally useful—trinkets lurking in the dusty corners of UNIX-like operating systems. Imagine, if you will, a Jane Austen novel about three sisters. The first is well-known and celebrated by everyone; the second, while slightly smarter and more capable, is significantly less popular; and the third languishes in near-total isolation and obscurity. These three sisters live on any UNIX-like system, and their names are grep , egrep , and fgrep . We will assume you are already familiar with grep — egrep works pretty much the same, except she handles e xtended regular expression syntax. (When writing shell scripts intended to be portable, be careful to call egrep if your expression uses + , ? , | , or braces as metacharacters. Some versions of GNU grep make no distinction between basic and extended regular expressions, so you may be surprised when your script works on one system but not another.) But our subject for today is poor, unnoticed fgrep . While the plainest sister of the three, she really doesn't deserve to be ignored. The "f" in her name stands either for f ixed-string or f ast, depending on who you ask. She does not handle regular expressions at all; the pattern she is given is taken literally. This is a great advantage when what you are searching for contains characters having special meaning in a regular expression. Suppose you have a directory full of PHP scripts and want to find references to an array element called $tokens[0] . You can try grep (note that the single quotes are necessary to prevent the shell from interpreting $tokens as a shell variable): $ grep '$tokens[0]' *.php But there is no output. The reason is that the brackets have special significance to grep ; [0] is interpreted as a character class containing only 0. Therefore, this command looks for the string $tokens0 , which is not what we want. We would have to escape the brackets with backslashes to get the correct match (some implementations may require you to escape the dollar sign also): $ grep '$tokens\[0\]' *.php parser.php: $outside[] = $tokens[0]; Instead of fooling with all that escaping (which might get tedious if our pattern contains many special characters), we can just use fgrep instead: $ fgrep '$tokens[0]' *.php parser.php: $outside[] = $tokens[0]; One place where fgrep can be particularly handy is when searching through log files for IP addresses. With ordinary grep , the pattern 43.2.1.0 would match 43.221.0.123, 43.2.110.123, and a bunch of other IP addresses you're not interested in because the dot metacharacter will match any character. To make sure you only matched a literal dot you'd have to escape each one with a backslash or, better yet, use fgrep . But what about the claim that fgrep is fast? On GNU systems, there is usually one single binary that changes its behavior depending on whether it is called as grep , egrep , or fgrep . (Actually, this is in line with the POSIX standard 1 , which deprecates egrep and fgrep in favor of a single grep command taking the -E option for using extended regular expressions and the -F option for doing fixed-string searches.) In testing, we found that when specifying a single pattern on the command line, fgrep wasn't really any faster than grep . However, when using the -f option to specify a file containing a list of a couple dozen patterns, fgrep could consistently produce a 20% time savings. On systems where grep and fgrep are different binaries, there can potentially be a more dramatic difference in speed and even memory usage. In our hypothetical Austen novel, the neglected sister would probably be driven to a bad end, to be only spoken of afterward in hushed whispers. Don't let that happen! Whenever you need to search for a string, but don't require the power of regular expressions, get into the habit of calling on fgrep . She can be very helpful and deserves more attention than she gets. You'll save yourself the trouble of worrying about metacharacters and maybe some running time as well. References: Grep specification https://pubs.opengroup.org/onlinepubs/009695399/utilities/grep.html#tag_04_63_18 This article was originally written in June 2010. The podcast episode was recorded in February 2026. Provide feedback on this episode.

This show has been flagged as Clean by the host. Women in Digital and Games By Digital and Creative Technologies - West Suffolk College 73 Western WayBury St Edmunds, England Friday, Mar 27 from 6 pm to 8 pm Join us in person to celebrate and empower Women in Digital and Games with talks, networking, and fun! Get ready to connect, learn, and be inspired at this awesome in-person event celebrating amazing women in the digital and games industries. Whether you're a student, professional, or just curious, come hang out, hear stories, and boost your network. Don’t miss out on an empowering evening filled with energy and inspiration! Source: Eventbrite https://share.google/SXD66BhsftLmQ3Yfx https://share.google/SXD66BhsftLmQ3Yfx https://camjam.me/ https://www.computinghistory.org.uk/ Provide feedback on this episode.

This show has been flagged as Explicit by the host. Here is some no nonsense advice for recording decent sounding audio using Linux and open-source software! Some of my links: Mastodon: https://indieweb.social/@stranded_output PeerTube: https://peertube.wtf/c/strandedoutput/videos Linux Lads podcast: https://linuxlads.com/ YouTube channel: https://www.youtube.com/@strandedoutput2916 Personal site: https://strandedoutput.com/ Provide feedback on this episode.

This show has been flagged as Explicit by the host. Nova Scotia https://novascotia.com/ Akron, Ohio https://www.akronohio.gov/ Stow, Ohio https://www.stowohio.gov/ Kent , Ohio https://www.kentohio.gov/ Kent State Riots https://www.britannica.com/event/Kent-State-shootings Cuyahoga Falls https://www.downtowncf.com/ HAZMAT Truck Certification https://www.tsa.gov/for-industry/hazmat-endorsement 1095-C Form https://www.irs.gov/forms-pubs/about-form-1095-c Boston City Hall https://en.wikipedia.org/wiki/Boston_City_Hall Give Me 40 Acres (To Turn This Rig Around) - Willis Brothers (song) https://genius.com/The-willis-brothers-give-me-40-acres-to-turn-this-rig-around-lyrics https://en.wikipedia.org/wiki/Give_Me_Forty_Acres_(To_Turn_This_Rig_Around) Brutalist Architectural Style https://www.riba.org/explore/riba-collections/architectural-styles/brutalism-movement/ 105 MM Howitzer https://americangimuseum.org/collections/restored-vehicles/m2a1-105mm-howitzer-1941-1953/ 1812 Overture https://www.kdfc.com/articles/tchaikovsky-1812-overture Boston Tunnel Project aka The Big Dig https://www.mass.gov/info-details/the-big-dig-project-background Camel Nose In Your Tent https://markeckel.com/2024/06/18/the-camels-nose/ Manhatten Project https://www.nps.gov/mapr/learn/manhattan-project.htm Morgentown, West Virgina https://www.morgantownwv.gov/ Mount Blue State Park https://apps.web.maine.gov/cgi-bin/online/doc/parksearch/details.pl?park_id=18 Belgrade Lakes https://visitmaine.com/articles/belgrade-lakes/ T-34 Airplane https://www.military.com/equipment/t-34c-turbo-mentor F5 Fighter https://www.northropgrumman.com/what-we-do/aircraft/f5-tiger DC 3 https://www.britannica.com/technology/DC-3 C-47 https://www.nationalww2museum.org/war/articles/douglas-c-47-skytrain T-6 https://www.af.mil/About-Us/Fact-Sheets/Display/Article/104548/t-6a-texan-ii/ Civil Air Patrol https://www.gocivilairpatrol.com/ F4U Corsair https://www.nationalww2museum.org/visit/museum-campus-guide/us-freedom-pavilion/george-hw-bush-aviation-gallery/vought-f4u-corsair Black Sheep Squadron (TV Show) https://www.rottentomatoes.com/m/black_sheep_squadron Hawaii https://www.gohawaii.com/ F4 Phantom https://www.collingsfoundation.org/aircrafts/f-4d-phantom/ Vietnam https://vietnam.travel/node/1336 Thailand https://www.tourismthailand.org/Home F14 https://airandspace.si.edu/collection-objects/grumman-f-14dr-tomcat/nasm_A20040156000 F15 https://www.military.com/equipment/f-15-eagle Fort Bliss https://www.military.com/equipment/f-15-eagle No Toilet Paper For Russian Troops https://en.wikipedia.org/wiki/Operation_Tamarisk Boston Linux User Group <a href="https://blu.org/" rel="noopener noreferr...

This show has been flagged as Explicit by the host. Aldi https://www.aldi.us/ https://en.wikipedia.org/wiki/Aldi Does Aldi's Summit Diet Cola Contain Aspartame? https://www.thedailymeal.com/1465489/does-aldi-cola-contain-aspartame/ Aspartame and Other Sweeteners in Food https://en.wikipedia.org/wiki/Aspartame https://www.fda.gov/food/food-additives-petitions/aspartame-and-other-sweeteners-food https://pmc.ncbi.nlm.nih.gov/articles/PMC8227014/ Sugar: THE BITTER TRUTH https://www.youtube.com/watch?v=dBnniua6-oM How to Make Up Comebacks when Somebody Calls You Fat https://www.wikihow.com/Make-Up-Comebacks-when-Somebody-Calls-You-Fat Swimming With Men - You Calling Me Fat? https://www.youtube.com/watch?v=JbD_sk0ih0g "Weird Al" Yankovic - Fat (Official Video) https://www.youtube.com/watch?v=t2mU6USTBRE Sam's Club https://www.samsclub.com/ 3rd Rock from the Sun https://en.wikipedia.org/wiki/3rd_Rock_from_the_Sun Interstate Highway System https://en.wikipedia.org/wiki/Interstate_Highway_System History of the Interstate Highway System https://highways.dot.gov/highway-history/interstate-system/50th-anniversary/history-interstate-highway-system https://www.gbcnet.com/ushighways/history.html https://www.history.com/articles/interstate-highway-system https://www.historicushighways.com/history-of-us-highways https://vividmaps.com/evolution-interstate-highway-system/ https://www.youtube.com/watch?v=SF16uDPGi14 99% Invisible https://99percentinvisible.org/ https://en.wikipedia.org/wiki/99%25_Invisible Devhack is a Queer-focused hackerspace https://wiki.hackerspaces.org/%E2%88%95dev/hack https://devhack.net/ Beyond The Exit https://www.youtube.com/@BTE4172/videos Amtrak https://www.amtrak.com/home Palmer Raids https://en.wikipedia.org/wiki/Palmer_Raids Mumble project https://www.mumble.info/ LinuxLugCast https://linuxlugcast.com/ n scale piedmont northern boxcar https://www.worthpoint.com/worthopedia/scale-kadee-piedmont-northern-40-1840448079 N scale https://en.wikipedia.org/wiki/N_scale HO scale https://en.wikipedia.org/wiki/HO_scale Rail transport modelling scales https://en.wikipedia.org/wiki/Rail_transport_modelling_scales Navy Pier https://en.wikipedia.org/wiki/Navy_Pier https://navypier.org/ The IT Crowd https://en.wikipedia.org/wiki/The_IT_Crowd https://www.imdb.com/title/tt0487831/ A Christmas Story https://en.wikipedia.org/wiki/A_Christmas_Story Die Hard https://www.imdb.com/title/tt0095016/ https://theconversation.com/nine-reasons-why-die-hard-really-is-a-christmas-film-173801 The Fifth Element https://en.wikipedia.org/wiki/The_Fifth_Element Footloose https://en.wikipedia.org/wiki/Footloose Tom Cruise's Couch Jump <a href="https://people.com/tom-c...

This show has been flagged as Explicit by the host. ### Eps 02 Start ### Amazon Alexa https://en.wikipedia.org/wiki/Amazon_Alexa https://developer.amazon.com/en-US/alexa Home Assistant https://en.wikipedia.org/wiki/Home_Assistant https://www.home-assistant.io/ Steelseries: Arctis 9X https://steelseries.com/gaming-headsets/arctis-9x https://headphonereview.com/over-ear/steelseries-arctis-9x-gaming-headset-review/ Razer: Nari series https://www.razer.com/pc/gaming-headsets-and-audio/nari-family https://mysupport.razer.com/app/answers/detail/a_id/3636/~/razer-nari-ultimate-%7C-rz04-02670-support-%26-faqs Skullcandy: crusher https://www.skullcandy.com/collections/skullcandy-crusher-bass Audio-Technica ATH-M50x https://www.audio-technica.com/en-us/ath-m50x HyperX: cloud https://hyperx.com/collections/gaming-headsets Plantronics Headset https://plantronicsstore.com/ Skullcandy: Hesh 3® Wireless https://support.skullcandy.com/hc/en-us/articles/360008277374-Hesh-3-Wireless Centauri Carbon https://www.elegoo.com/pages/elegoo-centauri-carbon https://us.elegoo.com/products/centauri-carbon?srsltid=AfmBOooFOZ2ms1EDtl2TiIAajyqMjkLFTkPb0hMFzis2PZs8sbdgpfRn Ender-3 https://www.creality.com/products/ender-3-3d-printer https://www.creality3dofficial.com/products/official-creality-ender-3-3d-printer Monoprice Maker Select V2 https://monopricesupport.kayako.com/article/278-maker-select-v2-manual-quick-start-guide-part-13860 https://www.treatstock.com/machines/item/237-maker-select baha GmbH https://www.baha.com/?culture=en-US&ts=1768855891246 HP Elite Mini 600 https://www.hp.com/us-en/shop/mdp/desktops-and-workstations/hp-elite-mini-600-3074457345617692179--1 HP 9000 https://en.wikipedia.org/wiki/HP_9000 Full Circle Magazine https://fullcirclemagazine.org/ Mintcast https://mintcast.org/ Podcatcher https://en.wikipedia.org/wiki/List_of_podcast_clients Podcast addict https://podcastaddict.com/ Antenna pod https://antennapod.org/ Robinhood: Trading & Investing https://robinhood.com/us/en/ E-Trade is an investment brokerage and electronic trading platform https://us.etrade.com/home Distrohoppers' Digest Podcast https://distrohoppersdigest.org/ Spotify https://open.spotify.com/ Software-defined radio https://en.wikipedia.org/wiki/Software-defined_radio Filk music https://en.wikipedia.org/wiki/Filk_music OggCamp 2026 https://www.oggcamp.org/ Moss music https://mordewis.bandcamp.com/ Discord https://discord.com/ https://support.discord.com/hc/en-us/articles/360030853132-Server-Folders-101 The Hitchhiker's Guide to the Galaxy https://en.wikipedia.org/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy Baofeng BF-50 <a href="https://www.baofengradio.com/products...

This show has been flagged as Explicit by the host. PFSense https://www.pfsense.org/ Chromebook https://www.google.com/chromebook/discover-chromebook/ AMD Sempron 140 https://www.techpowerup.com/cpu-specs/sempron-140.c820 Trinity https://www.trinitydesktop.org/ XFCE https://www.xfce.org/ Chrome OS https://chromeos.google/ SSH https://www.ssh.com/ Onshape https://www.onshape.com/en/ TinkerCAD https://www.tinkercad.com/ Thorium OS https://thorium.rocks/thoriumos Tech And Coffee https://techandcoffee.info/ Panera https://www.panerabread.com/en-us/home.html IHOP https://www.panerabread.com/en-us/home.html Waffle House https://www.wafflehouse.com/ In And Out Burger https://www.in-n-out.com/ Economies Of Scale https://www.investopedia.com/terms/e/economiesofscale.asp Dunkin Donuts https://www.dunkindonuts.com/en F-Droid https://f-droid.org/en/ Cheap Yellow Display https://blog.decryption.net.au/posts/cyd-for-beginners.html NTP Server https://www.ntppool.org/en/ Beagle (Dog) https://www.akc.org/dog-breeds/beagle/ Siamese Cat https://www.life-with-siamese-cats.com/ Bsides InfoSec Conference - Knoxville, TN https://www.papercall.io/bsides-knoxville-2026 CI/CD Pipeline https://circleci.com/blog/what-is-a-ci-cd-pipeline/ Strace Command https://www.geeksforgeeks.org/linux-unix/strace-command-in-linux-with-examples/ High Pass Filter https://www.izotope.com/en/learn/6-ways-to-use-a-high-pass-filter-when-mixing Waters & Stanton - Radio Shop https://www.hamradiostore.co.uk/ Home Assistant https://www.home-assistant.io/ ESP 32 https://www.espressif.com/en/products/socs/esp32 EMF Camp https://www.emfcamp.org/ YAML https://yaml.org/ ChatGPT https://chatgpt.com/ TOR https://www.torproject.org/ IPTables https://linux.die.net/man/8/iptables https://ccrma.stanford.edu/planetccrma/man/man8/ipchains.8.html RSYNC https://linux.die.net/man/1/rsync SYM Link https://stackoverflow.com/questions/1951742/how-can-i-symlink-a-file-in-linux CDN (Content Delivery Network) https://www.cloudflare.com/learning/cdn/what-is-a-cdn/ Mastadon https://joinmastodon.org/ DuoLingo https://www.duolingo.com/ Fedora https://en.wikipedia.org/wiki/Fedora Pea Coat <a href="https://www.artofmanliness.com/style/clothing/mans-guide-pea-coat/" rel="noopener noreferrer" target="_blank" style="background-color: rgb(227, 255, ...