[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

export PWD

From: Jörg Hohwiller
Subject: export PWD
Date: Thu, 04 Jul 2002 01:47:34 +0200
User-agent: KNode/0.7.1

Hi there,

I do not have a bug report, so I guess I am sort of wrong here...
Sorry for bugging you anyways - I did not find a better place to
post my question:

I have a script lets call it yyy that determines a special directory
depending on the arguments parsed. What I want is a way to have
a simple command that parses all its args to yyy and then cds to the
resulting directory of yyy.
Did not get it?
[~]# yyy gcc
[~]# cd /usr/src/Sources/gcc

What I want is to have a command that does both commands above.
I read the damn long bash manpage and could not find a way for a
script to change the actual working directory (tried popd, etc.)
so my last chance was something with alias
  alias mycd='cd $(yyy $@)'
damn aliases are just a replacement of the command, so yyy does not
get any args if you call e.g. mycd gcc.
Last trie was
  alias mycd='cd `yyy '
now it works with
  mycd gcc`
but I really do not want to have the backquote there.

Any ideas, smart guyz out there?
A small hint would be very welcome...

Thanx a lot

reply via email to

[Prev in Thread] Current Thread [Next in Thread]