|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Is there a way to retain the "link path" when I do pwd or cwd ?
for e.g. lets say, I do the following: cd /link1/link2/link3/folder4/ pwd I want to get back "/link1/link2/link3/folder4/" instead of /nfs/blah/blah/blah/blah/folder4/ Can this be done ? Mahurshi Akilla |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
"Mahurshi Akilla" <mahurshi@gmail.com> writes:
> Is there a way to retain the "link path" when I do pwd or cwd ? > > for e.g. > > lets say, I do the following: > > cd /link1/link2/link3/folder4/ > pwd > > I want to get back "/link1/link2/link3/folder4/" > instead of /nfs/blah/blah/blah/blah/folder4/ It depends which shell do you use. Try pwd -P -- jimmij |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
jimmij <jimmij@jj.jj> writes:
>> Is there a way to retain the "link path" when I do pwd or cwd ? >> >> for e.g. >> >> lets say, I do the following: >> >> cd /link1/link2/link3/folder4/ >> pwd >> >> I want to get back "/link1/link2/link3/folder4/" >> instead of /nfs/blah/blah/blah/blah/folder4/ > > It depends which shell do you use. Try > pwd -P Ehh... In this case rather "pwd -L" ![]() -- jimmij |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Mar 10, 12:35 am, jimmij <jim...@jj.jj> wrote:
> jimmij <jim...@jj.jj> writes: > >> Is there a way to retain the "link path" when I do pwd or cwd ? > > >> for e.g. > > >> lets say, I do the following: > > >> cd /link1/link2/link3/folder4/ > >> pwd > > >> I want to get back "/link1/link2/link3/folder4/" > >> instead of /nfs/blah/blah/blah/blah/folder4/ > > > It depends which shell do you use. Try > > pwd -P > > Ehh... In this case rather "pwd -L" ![]() > > -- > jimmij Hmm.. none of these options worked. I am using csh. What shell are you guys using? Mahurshi Akilla |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
"Mahurshi Akilla" <mahurshi@gmail.com> writes:
>> > It depends which shell do you use. Try >> > pwd -P >> >> Ehh... In this case rather "pwd -L" ![]() > > Hmm.. none of these options worked. I am using csh. What shell are > you guys using? Bash. In (t)csh you can use e.g. "echo $PWD". -- jimmij |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
"Mahurshi Akilla" <mahurshi@gmail.com> writes:
>> > It depends which shell do you use. Try >> > pwd -P >> >> Ehh... In this case rather "pwd -L" ![]() > > Hmm.. none of these options worked. I am using csh. What shell are > you guys using? Bash. In (t)csh you can use e.g. "echo $PWD". -- jimmij |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
jimmij <jimmij@jj.jj> writes:
> "Mahurshi Akilla" <mahurshi@gmail.com> writes: > >>> > It depends which shell do you use. Try >>> > pwd -P >>> >>> Ehh... In this case rather "pwd -L" ![]() >> >> Hmm.. none of these options worked. I am using csh. What shell are >> you guys using? > > Bash. > In (t)csh you can use e.g. "echo $PWD". Well, in csh there is a builtin variable $cwd Check the manual page. As I recall, on Solaris there is a variable you can set to get the function you want. Look at the "symlink" variable as well. -- Sending unsolicited commercial e-mail to this account incurs a fee of $500 per message, and acknowledges the legality of this contract. |
|
![]() |
| Outils de la discussion | |
|
|