Skip to content

Instantly share code, notes, and snippets.

@tvlooy
tvlooy / unit.sh
Last active August 20, 2025 15:42
Bash test: get the directory of a script
#!/bin/bash
function test {
MESSAGE=$1
RECEIVED=$2
EXPECTED=$3
if [ "$RECEIVED" = "$EXPECTED" ]; then
echo -e "\033[32m✔︎ Tested $MESSAGE"
else