OT: bash question
suvayu ali
fatkasuvayu+linux at gmail.com
Mon Jan 31 21:08:02 UTC 2011
On Mon, Jan 31, 2011 at 12:32 PM, Mike Wright
<mike.wright at mailinator.com> wrote:
> s there a bash command that tells an executing script what *its* path
> is? Not the path where the user is but where the script is.
$ cat ./test.sh
#!/bin/bash
echo $0 is the script
echo `dirname $0` is the script location
exit $?
HTH
--
Suvayu
Open source is the future. It sets us free.
More information about the users
mailing list