Skip to content

Instantly share code, notes, and snippets.

@iampavan
iampavan / bash_strict_mode.md
Created May 18, 2022 12:35 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@iampavan
iampavan / no_automount
Created June 1, 2021 21:11 — forked from akrabat/no_automount
Add a volume to /etc/fstab to prevent auto-mounting. See http://akrabat.com/prevent-an-external-drive-from-auto-mounting-on-macos/
#!/usr/bin/env bash
# Usage: ./no_automount My\ Disk
NAME=$1
if [ -z "$NAME" ] ; then
echo "Usage: no_automount {Disk Name}"
exit 1
fi
FSTAB=/etc/fstab