Path string manipulation functions for shell scripts.
path_resolve "$input"path_normalize "$input"path_pretty "$input"#!/usr/bin/env importimport "path"
echo "pwd is: $(pwd)"
path_resolve ".."# /tmp#!/usr/bin/env importimport "path"
path_normalize "/foo/./bar/.."# /foo#!/usr/bin/env importimport "path"
export HOME=/home/user
path_pretty "/home/user/file.txt"# ~/file.txt
path_pretty "/home/other/file.txt"# /home/other/file.txt