Hello Manish, Thanks a lot for your response.
Unfortunately my query was incomplete. I did not want way to append o/p of `pwd` to variable. What I wanted was a way to expand relative path to absolute path by removing unwanted prefixes such as "." or ".." and any other partial paths. csh by itself expands "~" but not "." and ".."
So if I store: set ABC = ./my/relative/path set DEF = `pwd`${ABC}
I get string such as: /home/kiran/./my/relative/path in DEF
This is a valid path-string, But I wanted to get away with the "."
OR in following example set ABC = ../kiran/my/relative/path set DEF = `pwd`${ABC}
I will get /home/kiran/../kiran/my/relative/path in DEF which again is a valid-path string. But what I want is, /home/kiran/my/relative/path in DEF
One way is: 1. Store current dir in a variable 2. cd to relative path 3. Do pwd and get result 4. Go back to original variable
But I hope ther must be a smarter way to do this. Sorry for the incomplte query posted earlier.
Thanking you, Best regards, - Kiran
Kiran Agashe wrote: Or is there any alternative way this can be done in
a
csh script? i.e. I have a relative path stored in a variable, and I want to extract absolute path from it.
Manish Wrote: Try: ABC=/my/relative/path DEF=`pwd`${ABC}
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com