5 ms·
Wouldn't readlink -f $0 work to get the actual location of the script, and from there get the base for relative scripts?
by AsthmaBoy 3y ago
Wouldn't
readlink -f $0
work to get the actual location of the script, and from there get the base for relative scripts?
- Asooka 3y agoThe -f flag is a GNU extension. Using realpath is more portable.