[Edit]
+
0
-
0

Bash - normalize path

1 2 3 4 5 6 7 8 9 10 11
#!/bin/bash input_path="/path/to/directory/../file" output_path="$(realpath "$input_path")" echo "$output_path" # Output: # # /path/to/file