I have written a bash script that takes an input file as an argument and reads it.
This file contains some paths (relative to its location) to additional files used.
$cat abs.sh
#!/bin/bash
echo "$(cd "$(dirname "$1")"; pwd -P)"
Some explanations:
"$1"dirname "$1"cd "$(dirname "$1"); into this relative dir pwd -P and get absolute path. The -P option will avoid symlinksecho itThen run your script:
abs.sh your_file.txt