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 October 27, 2024 12:27 — forked from tvlooy/unit.sh
Bash test: get the directory of a script
#!/bin/bash
tmp=$(python -c "import os, sys; print(os.path.realpath('/tmp'))")
function test {
MESSAGE=$1
RECEIVED=$2
EXPECTED=$3
if [ "$RECEIVED" = "$EXPECTED" ]; then