Skip to content

Instantly share code, notes, and snippets.

View AndersonTorres's full-sized avatar

Anderson Torres AndersonTorres

  • São Paulo, Brazil
View GitHub Profile
@AndersonTorres
AndersonTorres / unit.sh
Created October 27, 2024 12:27 — forked from ptc-mrucci/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