Skip to content

Instantly share code, notes, and snippets.

View BiosElement's full-sized avatar

William Chambers BiosElement

View GitHub Profile
@BiosElement
BiosElement / intensity_client.sh
Created February 19, 2010 07:54
Bash: Find path to script location.
#!/bin/bash
#==========================
# bash - find path to script
#==========================
abspath="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
# to get the path only - not the script name - add
path_only=`dirname "$abspath"`
echo $path_only