SyntaxFix
Write A Post
Hire A Developer
Questions
If you want to transform a variable containing a relative path into an absolute one, this works :
dir=`cd "$dir"`
"cd" echoes without changing the working directory, because executed here in a sub-shell.