Skip to content

Instantly share code, notes, and snippets.

View ptc-mrucci's full-sized avatar

Marco Rucci ptc-mrucci

  • PTC
  • Zurich, Switzerland
View GitHub Profile
@ptc-mrucci
ptc-mrucci / unit.sh
Last active July 2, 2025 00:12 — forked from tvlooy/unit.sh
Bash test: get the directory of a script
#!/bin/bash
python3 --version || { echo "ERROR: Missing python3"; exit 1; }
tmp=$(python3 -c "import os, sys; print(os.path.realpath('/tmp'))")
function test {
MESSAGE=$1
RECEIVED=$2
EXPECTED=$3