#!/bin/sh D1="$(dirname $0)" echo $D1 D0="(dirname $0)" echo $D0
What I type on the command line:
. (dirname ./test_script.sh)
What significance does the first dollar sign in D1's value have s.t. the command gets executed while D0's value is interpreted as a string?