I am trying to convert a relative path to an absolute path in my shell script.
This: /home/admin/Downloads/old/t2
should be something like this: ../../old/t2
.
I want to do this because the rsync command needs an absolute path.
Asked
Active
Viewed 39 times
0

Jack Gelder
- 13
- 5
-
`readlink -f` or `readlink -m` will do this, on a GNU platform. – Charles Duffy Jun 07 '18 at 17:20
-
replace home/admin with $HOME – shahidammer Jun 07 '18 at 17:21