Wednesday, July 23, 2008

How to find script file directory from with in the script ?

#!/bin/bash

base=${0%/*}
current=`pwd`

cd $base
echo "The Path is `pwd`"
cd $current



http://www.unix.com/shell-programming-scripting/25946-how-find-script-file-location-inside-script.html

No comments: