![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| $PWD shows absolute path vs path w/symbolic links | kornshellmaven | Shell Programming and Scripting | 3 | 06-13-2007 12:15 PM |
| about UNIX? original version? | slowchem | UNIX for Dummies Questions & Answers | 4 | 12-07-2006 01:25 AM |
| vi - replacing a relative path with absolute path in a file | Yinzer955i | UNIX for Dummies Questions & Answers | 2 | 09-07-2006 11:47 AM |
| ftp - get file and keep original timestamp? | frustrated1 | Shell Programming and Scripting | 2 | 03-15-2006 01:31 PM |
| Sort - original order .... Help | olga | UNIX for Dummies Questions & Answers | 2 | 06-01-2005 08:26 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I've got one I haven't been able to figure out.
1. A shell script exists- /junk/junk1/junk2/junk3.sh 2. From within the above named shell script, I want to know the full path of the above named shell script. Even if I execute the shell script from a directory other than the one it resides in, I want to know the directory where the script resides, not the path where the script was executed from. For example: I'm in: /home/myhome and I put the following on the command line: /junk/junk1/junk2/junk3.sh I want the following stored to a variable inside the script: /junk/junk1/junk2 I don't want the following stored to a variable inside the script: /home/myhome How do I figure this out? TIA Paul |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|