![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is there a way to list all the functions dotted in to the env? | easwam | AIX | 1 | 04-04-2008 05:26 PM |
| expanding standard terminal size | prkfriryce | Shell Programming and Scripting | 6 | 11-14-2006 01:38 PM |
| Expanding Variables in User Input | Bsk | UNIX for Advanced & Expert Users | 2 | 11-18-2005 10:45 AM |
| Dotted thread icons | Spetnik | Post Here to Contact Site Administrators and Moderators | 2 | 06-15-2004 10:27 AM |
| tar expanding trouble | TAT2ME74 | UNIX for Dummies Questions & Answers | 4 | 08-26-2002 10:35 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
expanding dotted paths to absolute ones in bash or sh
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. Last edited by TanRanger; 07-12-2005 at 06:18 PM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|