![]() |
|
|
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 |
| absolute path | Kirichiko | UNIX for Dummies Questions & Answers | 2 | 10-03-2007 07:30 AM |
| $PWD shows absolute path vs path w/symbolic links | kornshellmaven | Shell Programming and Scripting | 3 | 06-13-2007 01:15 PM |
| absolute path | filedeliver | High Level Programming | 4 | 06-05-2007 06:18 PM |
| vi - replacing a relative path with absolute path in a file | Yinzer955i | UNIX for Dummies Questions & Answers | 2 | 09-07-2006 12:47 PM |
| HOW to make absolute path???? HELP | youngvet | High Level Programming | 1 | 11-01-2003 04:58 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Test whether absolute path in variable
I'm using the following line in bash to test whether an argument supplied is an absolute path or not:
if echo $1 | grep '^/' > /dev/null then absolute=1 else absoute=0 fi The line appears to work but seems somewhat unprofessional looking to me. Is it an acceptable way to test this or is there some more advisable way? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|