Loop line over lines, whatever spaces in it:
while IFS= read -r line; do
echo "... $line ..."
done < <(printf '%s' "$list")
#!/bin/bash | |
# Usage example: | |
# gen_favicon.sh SVG_FILE.svg OUT_FILE.ico | |
set -eu | |
# Generate favicon from official logo | |
convert -density 300 -define icon:auto-resize=256,128,96,64,48,32,16 -background none $1 $2 |
#!/bin/bash | |
set -eu | |
# set -x | |
install_system() | |
{ | |
apt install python3 py3-pip git | |
pip install --root-user-action=ignore poetry | |
} |
#!/bin/bash | |
# From: https://gist.github.com/ipedrazas/2c93f6e74737d1f8a791?permalink_comment_id=3704504#gistcomment-3704504 | |
set -eu | |
function dip() { | |
local cols='%-13s %-48s %-40s %-80s' | |
_print_container_info() { | |
local container_id |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Version: 08-2024 | |
# Migrated to: https://github.com/mrjk/python_snippets/blob/main/examples/typer/cli-app-typer.py | |
"""MyApp CLI interface | |
This CLI provides a similar experience as the git CLI, but in Python with Typer. |
#!/bin/bash | |
# Utility to discover installed binaries | |
set -eu | |
path_list () | |
{ | |
tr ':' '\n' <<< "$PATH" |
#!/bin/bash | |
# TEMPLATE_VERSION=2024-04-25 | |
# Basic bash template for command/resource based CLI. | |
# Features: | |
# * Automatic command discovery and help generation | |
# * Logging and traces | |
# * Application dependency checker | |
# * Support for getopts | |
# * Return code support |
{ | |
"model": { | |
"id": "linksys,mr8300", | |
"name": "Linksys MR8300 (Dallas)" | |
}, | |
"network": { | |
"lan": { | |
"device": "eth0", | |
"protocol": "static" | |
}, |
#!/bin/bash | |
# TEMPLATE_VERSION=2023-10-19 | |
# Basic bash template for command/resource based CLI. | |
# Features: | |
# * Automatic command discovery and help generation | |
# * Logging and traces | |
# * Application dependency checker | |
# * Support for getopts | |
# * Return code support |