2011/07/31

shell tips: get absolute path

$ cat abspath.sh
#!/bin/sh

echo $(cd $(dirname $0) && pwd)/$(basename $0)

No comments:

Post a Comment

100