I knew open source meme generators would exist, but I never searched for them before. Here is a small table with generator and repository columns:
Archive for the ‘sh’ Category
Open source meme generators on GitHub
Posted by jpluimers on 2026/08/20
Posted in *nix, *nix-tools, ash/dash, bash, bash, Batch-Files, Bookmarklet, CSS, Development, HTML, JavaScript/ECMAScript, Makefile, Power User, Python, Scripting, sh, Sh Shell, Software Development, Web Browsers, Web Development | Leave a Comment »
GitHub – Botspot/bvm: Windows 11 Virtual Machine on ARM Linux
Posted by jpluimers on 2026/07/27
This is way easier than I thought (but you need Raspberry Pi 5 or it will be dead slow on earlier models): [Wayback/Archive] GitHub – Botspot/bvm: Windows 11 Virtual Machine on ARM Linux
And yes, there are other write-ups for doing this, but this repository is so much easier and reliable than the others.
Did not test it outside of Raspbian yet, so not sure on which other distributions it runs. It will likely run on more plainDebian, but my guess is that Fedora, Ubuntu, OpenSuSE and others will be out.
Oh: better use NVMe instead of MicroSD for speed too.
Via:
- [WaybackSave/Archive] Jeff Geerling on X: “Fast Windows 11 VM on the Pi 5, courtesy of the new BVM project: …”
- [Wayback/Archive] Windows 11 VM on a Raspberry Pi (EASY mode!) – YouTube
--jeroen
Posted in *nix, *nix-tools, bash, CommandLine, Development, Power User, PowerShell, Scripting, sh, Sh Shell, Windows, Windows 11 | Leave a Comment »
A bit of perl trickery (or why you don’t should just execute any code you find on-line)
Posted by jpluimers on 2026/07/09
[Wayback/Archive] A bit of perl trickery shows a great example why you should only code you understand.
It explains the innards of a classic trap luring people into execute some obfuscated code, in this case Perl based.
Which makes it yet another testament to not blindly download and execute stuff from the internet.
So be aware when you see obfuscated scripts and things luring you into:
iex ((New-Object System.Net.WebClient).DownloadString(piped through PowerShell.curlpiped through bash, Perl, Python or other scripting languages
Be even more alert when these require elevated access (like running under sudo).
Via: [Wayback/Archive] Leo Bicknell on Twitter: “@jpluimers @IanColdwater Executes “rm -rf /”. This is ancient Perl monks way of teaching people not to run programs they don’t understand as root. … But hey, these days people “curl -o – url | bash”. It’s surprising that isn’t exploited more.”
Which was response to me asking what the below code did that was fully misunderstood by ChatGPT (which is Large Language Model based on a large corpus of natural language, not a small corpus of evil red-team programming language code snippets) to a series of Tweets by Ian Coldwater.
Posted in *nix, *nix-tools, ash/dash, bash, bash, CommandLine, Development, Perl, Power User, PowerShell, PowerShell, Python, RegEx, Scripting, sh, Software Development | Leave a Comment »
Lots of interesting programming learning games links via b0rk on Twitter
Posted by jpluimers on 2024/06/25
Every once in a while, b0rk (Julia Evans, of [Wayback/Archive] wizard zines fame) asks interesting questions like below that results in lot of cool links.
I have blogged assemblies of them before (see for instance Lots of interesting git links via b0rk on Twitter) and this one is no different:
[Wayback/Archive] Julia Evans on Twitter: “what are some helpful programming learning games? thinking of things like mystery.knightlab.com for SQL, and flexboxfroggy.com, and ohmygit.org especially interested in games that have helped you learn something”
- [Wayback/Archive] The SQL Murder Mystery
- [Wayback/Archive] Flexbox Froggy – A game for learning CSS flexbox
- [Wayback/Archive] Oh My Git!
The response was overwhelmingly good (I tried to indicate when games are not free or not playable from a web browser). I summarised it below.
Posted in *nix, *nix-tools, Conference Topics, Conferences, CSS, Database Development, Development, DVCS - Distributed Version Control, Event, Games, git, Multi-Threading / Concurrency, Power User, RegEx, Scripting, sh, Sh Shell, Software Development, Source Code Management, SQL, Web Development | Leave a Comment »
Don’t fall for the golden hammer: avoid git empty commits, especially for kicking off parts of your CI/CD
Posted by jpluimers on 2022/08/16
A while back Kristian Köhntopp (isotopp) wrote a blog post after quite a Twitter argument where he poses against using git empty commits. I’m with Kris: don’t use them for anything, especially not for kicking off your CI/CD.
Basically his blog post is all about avoiding to think you have a golden hammer, and avoid falling for the Law of the instrument – Wikipedia.
Originally, Abraham Maslow said in 1966:
“I suppose it is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail.”
For me this has all to do with preventing technical debt: find the right tool to kick your CI/CD pipeline after part of that chain somehow malfunctioned is way better than polluting the commit history with empty commits.
His blog post: [Wayback/Archive.is] Empty commits and other wrong tools for the job | Die wunderbare Welt von Isotopp
The most important bit in it:
And since we are talking about CI/CD pipelines: Don’t YAML them. Don’t JSON them. Don’t XML them.
…
Programming in any of these three is wrong use of tooling, and you should not do it.
- YAML, JSON and XML are for declarative things.
- Python, Go and Rust are for procedural things.
- Bash is for interactive use only.
Use the proper tooling for the job. Be an engineer.
This very much reminds me of an Entwickler Konferenz keynote a long time ago, where Neal Ford made the point that most software engineers act very much unlike what is expected from traditional engineering way of operating where the engineer is both responsible and liable for his actions.
The start of the Twitter thread: [Archive.is] Kristian Köhntopp on Twitter: “A lot of people right now that git is an API and triggering CI/CD pipelines with empty commits replaces the equivalent of a Kubernetes controller for their fragile pile of bash in git triggers. This is broken and begets more brokenness. Evidence:… “
The tweet that started the subtweet: [Archive.is] Florian Haas on Twitter: “(For anyone wondering, what’s nice about this one is it works in any CI. So you don’t have to remember how to manually kick off a GitLab CI pipeline or GitHub Action or Zuul job, you just push an empty commit and off you go.)”
Other relevant tweets:
- [Archive.is] Kristian Köhntopp on Twitter: “If you go down this path, stop right now and rethink your life choices. If you ever need this, you are very likely holding it very wrong and you need to wake up the engineer in you.”
- [Archive.is] Patrick Gerken on Twitter: “Naja, sowohl bei git als auch bei der gitlab api muss ich mich einmal authentifizieren und die auth daten irgendwo sicher ablegen. Dann ist es bei beidem ein einzelnes Kommando. Ich bin nur auf der Console in der Regel noch nicht bei der APIauthentifiziert.… “
- [Archive.is] Patrick Gerken on Twitter: “… “
- [Wayback/Archive.is] How to trigger pipeline securely from the terminal ($2185598) · Snippets · Snippets · GitLab
This solution still has one drawback. Gitlab requires a project specific token. If every developer uses the same token, its validity is bound to the project and not the individual contributor. While Gitlab allows users to create personal access tokens, you cannot require such a token to trigger a pipeline.
- [Wayback/Archive.is] How to trigger pipeline securely from the terminal ($2185598) · Snippets · Snippets · GitLab
- [Archive.is] Patrick Gerken on Twitter: “… “
- [Archive.is] Kristian Köhntopp on Twitter: “”But I need to retrigger the deployment, because I need a Terraform run after I lost an instance.” This needs a proper reconciliation loop. If you are not on K8s, you need to write a thing that reinvents K8s for your infrastructure.”
- [Archive.is] Kristian Köhntopp on Twitter: “Normale CI-Pipelines haben eine REST-API, die man curlen kann, wenn man sich 15 Sekunden Zeit nimmt, die Doku zu greppen.… “
- [Archive.is] Kristian Köhntopp on Twitter: “Take this instead.… “ / [Archive.is] Kristian Köhntopp on Twitter: “Empty commits and other wrong tools for the job If you look at empty commits and think they can be useful for you, maybe you need to stop and think.”
- [Archive.is] Jeroen Wiert Pluimers on Twitter: “That “Be an engineer” is very much no coincidence and reminds me of an @EntwicklerKON keynote by @neal4d a long time ago where he posed that IT engineers act very much unlike traditional engineers and hardly bear responsibility or liability. So use the right tool for the job.… “
Yes, you want to avoid shell too (anything like for instance sh, ash, dash, bash or zsh), but you have to know it (and understand why to avoid it) as often it is the only interactive way to access systems from the console.
And of course Kris also wrote a big document on that too, which is available as full PDF (Wayback), full HTML (Wayback) and chaptered HTML Die UNIX Shell /bin/sh.
But more importantly, Kris wrote [Wayback/Archive.is] Using Python to bash | Die wunderbare Welt von Isotopp which is about using Python to do things you might be tempted to do in the shell. It quotes
Shell is a thing you want to understand and then not use, because you learned to understand it.
which is from the German post in thread [Wayback/Archive.is] Bashprogrammierung, wo gehts am besten los which quotes Kris’ 1998 message:
From kris Tue Sep 1 11:26:12 1998 From: kris Newsgroups: de.comp.os.unix.misc Subject: Re: Shell-Frage, find, xargs, kopieren von vielen Dateien References: <6seh24$q9a$2...@nz12.rz.uni-karlsruhe.de> From: kr...@koehntopp.de (Kristian Koehntopp) Alignment: chaotic/neutral X-Copyright: (C) Copyright 1987-1998 Kristian Koehntopp -- All rights reserved. MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Marc.Hab...@gmx.de (Marc Haber) writes: >mir ist das ganze Zeug mit der Shell, find, xargs und Konsorten noch >reichlich verschlüsselt. http://www.koehntopp.de/kris/artikel/unix/shellprogrammierung/ >xargs hin oder sollte ich besser ein Perlskript schreiben? Verwende Perl. Shell will man koennen, dann aber nicht verwenden. Kristian
–jeroen
Posted in *nix, *nix-tools, ash/dash, ash/dash development, bash, bash, Conference Topics, Conferences, Continuous Integration, Development, DVCS - Distributed Version Control, Event, git, Power User, Scripting, sh, Sh Shell, Software Development, Source Code Management, Technical Debt | Leave a Comment »
checkbashisms(1) – Linux man page
Posted by jpluimers on 2021/11/17
Even with lots of experience, one learns new things every day.
A while ago, I discovered checkbashisms which checks sh shel scripts (usually with extension .sh) scripts to they do not contain code specific to bash.
[Wayback] checkbashisms(1) – Linux man page
checkbashisms, based on one of the checks from the lintian system, performs basic checks on /bin/sh shell scripts for the possible presence of bashisms. It takes the names of the shell scripts on the command line, and outputs warnings if possible bashisms are detected.
Note that the definition of a bashism in this context roughly equates to “a shell feature that is not required to be supported by POSIX”; this means that some issues flagged may be permitted under optional sections of POSIX, such as XSI or User Portability.
In cases where POSIX and Debian Policy disagree, checkbashisms by default allows extensions permitted by Policy but may also provide options for stricter checking.
The source by now is a Perl script (it used to be a bash script) of which you can find the latest version here: [Wayback] scripts/checkbashisms.pl · master · Debian / devscripts · GitLab
Not installed by default
Virtually no distribution has checkbashisms installed by default.
In fact, the package containing checkbashisms heavily varies by distribution.
For OpenSuSE, it is in a package by itself: [Wayback] openSUSE Software: package checkbashisms
checkbashisms
Tool for Checking /bin/sh Scripts for Possible Bashisms
checkbashisms performs basic checks on /bin/sh shell scripts for the possible presence of bashisms. It takes the names of the shell scripts on the command line, and outputs warnings if possible bashisms are detected.
–jeroen
Posted in *nix, *nix-tools, bash, bash, Development, Power User, Scripting, sh, Sh Shell, Software Development | Leave a Comment »
VMware ESXi console: viewing all VMs, suspending and waking them up: part 2
Posted by jpluimers on 2021/04/27
Last week ended up to be a kind of VMware ESXi heavey, and this week will be similar. So it is time for following up on VMware ESXi console: viewing all VMs, suspending and waking them up: part 1.
That one ended with
Then we get this to print some of the capture groups:
vim-cmd vmsvc/getallvms | sed -n -E -e "s/^([[:digit:]]+)\s+((\S.+\S)?)\s+(\[\S+\])\s+(.+\.vmx)\s+(\S+)\s+(vmx-[[:digit:]]+)\s*?((\S.+)?)$/Vmid:\1 Guest:\6 Version:\7 Name:\3 Datastore:\4 File:\5 Annotation:\8/p"With this output:
Vmid:10 Guest:windows9_64Guest Version:vmx-14 Name:X9SRI-3F-W10P-EN-MEDIA Datastore:[EVO860_500GB] File:VM/X9SRI-3F-W10P-EN-MEDIA/X9SRI-3F-W10P-EN-MEDIA.vmx Annotation: Vmid:5 Guest:centos64Guest Version:vmx-11 Name:PPB Local_Virtual Machine_v4.0 Datastore:[EVO860_500GB] File:VM/PPB-Local_Virtual-Machine_v4.0/PPB Local_Virtual Machine_v4.0.vmx Annotation:PowerPanel Business software(Local) provides the service which communicatesFiguring out power state for each VM
This will be in the next installment, as by now this already has become a big blog-post (:
I basically went the vim-cmd vmsvc way instead of the esxcli vm way. My motivation was the easier to understand ID values. They are the basis of virtually all vim-cmd vmsvc based commands:
# vim-cmd vmsvc --help Commands available under vmsvc/: acquiremksticket get.snapshotinfo acquireticket get.spaceNeededForConsolidation createdummyvm get.summary destroy get.tasklist device.connection getallvms device.connusbdev gethostconstraints device.ctlradd message device.ctlrremove power.getstate device.disconnusbdev power.hibernate device.diskadd power.off device.diskaddexisting power.on device.diskextend power.reboot device.diskremove power.reset device.getdevices power.shutdown device.nvdimmadd power.suspend device.nvdimmremove power.suspendResume device.toolsSyncSet queryftcompat devices.createnic reload get.capability setscreenres get.config snapshot.create get.config.cpuidmask snapshot.dumpoption get.configoption snapshot.get get.datastores snapshot.remove get.disabledmethods snapshot.removeall get.environment snapshot.revert get.filelayout snapshot.setoption get.filelayoutex tools.cancelinstall get.guest tools.install get.guestheartbeatStatus tools.upgrade get.managedentitystatus unregister get.networks upgrade get.runtime
My “goto” for getting information is [Wayback] “vim-cmd vmsvc” site:vmware.com – Google Search, and a few sample pages are here:
- [Wayback] Performing common virtual machine-related tasks with command-line utilities (2012964) (showing that there are many tasks only
vim-cmd vmsvccan do, butesxcli vmcannot) - [Wayback] Powering on a virtual machine from the command line when the host cannot be managed using vSphere Client (1038043) (showing how to combine
vim-cmd vmsvc/getallvms,vim-cmd vmsvc/power.getstateandvim-cmd vmsvc/power.on) - [Wayback] Determine the power status of a virtual machine on an ESX or ESXi host (1003737) (showing
vim-cmd vmsvc/getallvms,vim-cmd vmsvc/power.getstateandps –auxwww | grep –i VM_NAME) - [Wayback] Collecting information about tasks in VMware ESXi/ESX (1013003) (showing the relation between VMs and tasks using
vim-cmd vimsvc/task_list,vim-cmd vmsvc/getallvmsandvim-cmd vimsvc/task_info) - [Wayback] Unable to Power off a Virtual Machine in an ESXi host (1014165) (focussing on
vim-cmd vmsvc/getallvms,vim-cmd vmsvc/power.getstate,vim-cmd vmsvc/power.shutdownandvim-cmd vmsvc/power.off) - [Wayback] Reloading a vmx file without removing the virtual machine from inventory (1026043) (showing
vim-cmd vmsvc/getallvmsandvim-cmd vmsvc/reload) - [Wayback] Investigating virtual machine file locks on ESXi hosts (10051) (trying to show how to combine
vim-cmd vmsvc/getallvms,grep,awk,findandxargsto findvmdkfiles, but fails because of parsing errors)
The pattern above is that most of the vim-cmd vmsvc examples are for power state and tasks. Not fully sure why, but my guess is it is what most people use it for. That kind of use what this series of posts also focuses on too, but certainly not the only use. Read the first numbered entry above to get a full grasp of what is possible. I hope to find time in the future to show some more examples outside the power and task realms.
Basically the only time you need to check out esxcli with VMs is when you cannot shut down a VM in a normal way. These links explain what to do in that case:
- [Wayback] Powering off an unresponsive virtual machine on an ESXi host (1004340)
- [Wayback] Unable to Power off a Virtual Machine in an ESXi host (1014165)
So let’s go back to basics, and start with getting info on all vim-cmd vmsvc commands.
Help on all vim-cmd vmsvc commands
Executing vim-cmd help vmsvc (preferred) or vim-cmd help vmsvc --help gives you all commands prepended with the line Commands available under vmsvc/:.
Executing vim-cmd help vmsvc/command prints the help for a single command (but vim-cmd help vmsvc/command -help first prints an error, then the help).
Here are the steps how I got the help help for all commands.
First I needed a list of all commands. This is already a multi-stage process, so below the full command I will explain the bits.
vim-cmd help vmsvc | sed '1d' | xargs -n 1 -r echo | sort
vim-cmd help vmsvcgives all the commands (two per line!) prepended by the lineCommands available under vmsvc/:.sed '1d'stripts that line.xargs -n 1 -r echodoes a lot of things:- It parses the
sed '1d'input line by line, splits each line into parts, combines all the parts, then executesechowith the combined parts - The
-n 1ensures each invocation ofechotakes only a single one of the combined parts -ris just a protection: if there is no input, thenechois never executed, resulting in empty output
- It parses the
sortwill sort all the combined output of all theechoinvocations to undo the horizontal combination of parts thatxargsdid
Now getting the help is doing more of the above, with some more bits to explain:
vim-cmd help vmsvc | sed '1d' | xargs -n 1 -r echo | sort | xargs -n 1 -r -I {} vim-cmd help vmsvc/{}
- Normally,
xargswill execute each command by appending the parameter inserting a space in front of each parameter -I {}will forcexargsto put each argument just as is in the place where{}is used in the argument- This executes
vim-cmd help vmsvc/commandin stead ofvim-cmd help vmsvc/ command
The result is a long blob of text that is very hard to read as there are no separators between the commands. I saved it as a [Wayback] vim-cmd help for each vmsvc command.txt gist.
With a sh -c shell trick, you can add some more information and separation to the output by embedding :
vim-cmd help vmsvc | sed '1d' | xargs -n 1 -r echo | sort | xargs -n 1 -r -I {} sh -c 'echo "-----" ; echo "help for vim-cmd help vmsvc/{}" ; echo ; vim-cmd help vmsvc/{}'
I have added the output to the [Wayback] delimited vim-cmd help for each vmsvc command.txt gist.
Commands taking a vmid parameter
Now that we know how to output all help, we can filter on it.
An interesting one is to filder only commands taking a vmid parameter:
vim-cmd help vmsvc | sed '1d' | xargs -n 1 -r echo | sort | xargs -n 1 -r -I {} vim-cmd help vmsvc/{} | grep -iw vmid
On VMware ESXi 6.7, this gets you the list:
Usage: acquiremksticket vmid Usage: acquireticket vmid ticketType Usage: destroy vmid Usage: device.connection vmid deviceKey connect Usage: device.connusbdev vmid usbid Usage: device.ctlradd vmid ctlr_type bus_number Usage: device.ctlrremove vmid ctlr_type bus_number Usage: device.disconnusbdev vmid usbid Usage: device.diskadd vmid size controller_numer unit_number datastore [ctlr_type] Usage: device.diskaddexisting vmid disk_file controller_number unit_number [ctlr_type] Usage: device.diskextend vmid new_size controller_numer unit_number [ctlr_type] Usage: device.diskremove vmid controller_number unit_number delete_file [controller_type] Usage: device.getdevices vmid Usage: device.nvdimmadd vmid size Usage: device.nvdimmremove vmid deviceKey Usage: device.toolsSyncSet vmid new state Usage: devices.createnic vmid adapter-type network-id [network-type] Usage: get.capability vmid Usage: get.config vmid Usage: get.config.cpuidmask vmid Usage: get.configoption vmid Usage: get.datastores vmid Usage: get.disabledmethods vmid Usage: get.environment vmid Usage: get.filelayout vmid Usage: get.filelayoutex vmid Usage: get.guest vmid Usage: get.guestheartbeatStatus vmid Usage: get.managedentitystatus vmid Usage: get.networks vmid Usage: get.runtime vmid Usage: get.snapshotinfo vmid Usage: get.spaceNeededForConsolidation vmid Usage: get.summary vmid Usage: get.tasklist vmid Usage: message vmid [messageId] [messageChoice] Usage: power.getstate vmid Usage: power.hibernate vmid Usage: power.off vmid Usage: power.on vmid Usage: power.reboot vmid Usage: power.reset vmid Usage: power.shutdown vmid Usage: power.suspend vmid Usage: power.suspendResume vmid Usage: queryftcompat vmid [faultToleranceType] Usage: reload vmid Usage: setscreenres vmid width height Usage: snapshot.create vmid [snapshotName] [snapshotDescription] [includeMemory] [quiesced] Usage: snapshot.get vmid Usage: snapshot.remove vmid snapshotId [removeChildren] Usage: snapshot.removeall vmid Usage: snapshot.revert vmid snapshotId suppressPowerOn Usage: snapshot.setoption [OPTIONS] vmid Usage: tools.cancelinstall vmid Usage: tools.install vmid Usage: tools.upgrade vmid [args] Usage: unregister vmid Usage: upgrade vmid [vm_hwversion]
In the above list, the bold entries have to do with power, that is what this series is supposed to center around, so more on that tomorrow.
–jeroen
Posted in *nix, *nix-tools, ash/dash, ash/dash development, Awk, Development, ESXi6, ESXi6.5, ESXi6.7, ESXi7, fgrep, Power User, Scripting, sed, sed script, sh, Sh Shell, Software Development, sort, Virtualization, VMware, VMware ESXi, xargs | Leave a Comment »
Backing up ZFS snapshots
Posted by jpluimers on 2018/12/06
An interesting idea at [WayBack] I was getting concerned about a backup, which had exceeded 1GB, when the data was only about 400MB. Once the job finished, I realized: Ahh, ZFS compres… – Dan Langille – Google+:
Here’s that script I use for creating/destroy the snaphots for a particular long dataset name. Then I backup from /mnt
[WayBack] gist.github.com/dlangille/480dbca509562eb03e76c2e1b576c6d2 is in sh, not even bash.
–jeroen
Posted in Development, Power User, Scripting, sh, ZFS | Leave a Comment »





