I have a little script to help me manage a gallery of image files. It makes symbolic links to every file in and below the current directory, placing them in a target directory which is passed to the script as a parameter. Unfortunately, the script pukes when I pass a parameter that contains dotted paths.
$ linkall /home/joe/foo
$ linkall ~/foo
work beautifully. The latter one works because the parameter is expanded before it is passed.
But,
$ linkall ../foo
pukes.
Does anyone know of a way to expand the passed parameter into an absolute path? I've tried everything I can think of. I'm having a hard time even thinking of the right query to Google for. Whenever that happens, I look for a forum.
It seems to me that I'm probably looking for some code that gets used in a lot of scripts; basically boilerplate that I've just never come across yet.
Other than by strictly using absolute paths, I can't think of any workarounds off the top of my head.
I can post the script if that would help. It's 68 lines.