home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!ames!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!news.funet.fi!hydra!klaava!klaava!hurtta
- From: hurtta@cs.Helsinki.FI (Kari E. Hurtta)
- Newsgroups: comp.unix.shell
- Subject: Re: alias problems
- Message-ID: <HURTTA.92Aug30220957@plootu.Helsinki.FI>
- Date: 30 Aug 92 20:09:57 GMT
- References: <1992Aug29.140835.15176@sfera.kharkov.ua>
- Sender: news@klaava.Helsinki.FI (Uutis Ankka)
- Organization: Department of Computer Science, University of Helsinki, Finland
- Lines: 27
- In-Reply-To: mickey@sfera.kharkov.ua's message of 29 Aug 92 14: 08:35 GMT
-
- In article <1992Aug29.140835.15176@sfera.kharkov.ua> mickey@sfera.kharkov.ua (Mickey Serg Antonoff) wrote:
- > there is a little problem to write alias in such way:
- >
- > alias md "sh -c 'for f in \!*;do mkdir $f ; cd $f;done'"
- --- -----
- > it have to do:
- > make directory, than cd to it;
- > call:
- > cd ~
- > md 1 2 3 4 5 6
- > result:
- > cwd = ~/1/2/3/4/5/6
-
- First:
-
- You create new process (sh) what executes this cd -command.
- No way. Parent (curretn shell) and that new process have
- OWN current working directory! CHILD's environment don't
- affect to parent !!!
-
-
- - K E H
- ( Kari.Hurtta@Hurtta.FI,
- hurtta@cc.Helsinki.FI,
- hurtta@cs.helsinki.FI,
- HURTTA@FINUH.BITNET
- )
-