Efficient scripting to get the directory path

This commit is contained in:
Salman Abedin 2020-06-05 01:37:55 +06:00
parent 32e0623424
commit 5144c675b3

View File

@ -10,7 +10,7 @@
# string "xelatex" somewhere in a comment/command in the first 5 lines.
file=$(readlink -f "$1")
dir=$(dirname "$file")
dir=${file%/*}
base="${file%.*}"
cd "$dir" || exit