Skip to content

Instantly share code, notes, and snippets.

View kurahaupo's full-sized avatar
🏠
Working from home

Martin Kealey kurahaupo

🏠
Working from home
  • Brisbane, Australia
  • 03:16 (UTC +10:00)
View GitHub Profile
@kurahaupo
kurahaupo / dialog.bash
Last active December 19, 2024 05:36
Implementing "dialog" in pure bash
#!/bin/bash
# (replace the preceding line with the path to Bash on your system)
# Takes the list of items as command-line parameters
# Interacts using stdin+stderr
# Writes the answer to stdout
# Use like:
# result=$( bash dialog.bash Foo Bar Zot Baz ) || exit
# or