home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / shell / 3697 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  1.4 KB

  1. 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
  2. From: hurtta@cs.Helsinki.FI (Kari E. Hurtta)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: alias problems
  5. Message-ID: <HURTTA.92Aug30220957@plootu.Helsinki.FI>
  6. Date: 30 Aug 92 20:09:57 GMT
  7. References: <1992Aug29.140835.15176@sfera.kharkov.ua>
  8. Sender: news@klaava.Helsinki.FI (Uutis Ankka)
  9. Organization: Department of Computer Science, University of Helsinki, Finland
  10. Lines: 27
  11. In-Reply-To: mickey@sfera.kharkov.ua's message of 29 Aug 92 14: 08:35 GMT
  12.  
  13. In article <1992Aug29.140835.15176@sfera.kharkov.ua> mickey@sfera.kharkov.ua (Mickey Serg Antonoff) wrote:
  14. >   there is a little problem to write alias in such way:
  15. > alias md "sh -c 'for f in \!*;do mkdir $f ; cd $f;done'"
  16.             ---                               -----
  17. >   it have to do:
  18. >     make directory, than cd to it;
  19. >   call:
  20. >     cd ~
  21. >     md 1 2 3 4 5 6
  22. >   result:
  23. >     cwd = ~/1/2/3/4/5/6
  24.  
  25. First:
  26.  
  27. You create new process (sh) what executes this cd -command.
  28. No way. Parent (curretn shell) and that new process have
  29. OWN current working directory! CHILD's environment don't
  30. affect to parent !!!
  31.  
  32.  
  33. - K E H
  34. ( Kari.Hurtta@Hurtta.FI,
  35.   hurtta@cc.Helsinki.FI,
  36.   hurtta@cs.helsinki.FI,
  37.   HURTTA@FINUH.BITNET
  38. )
  39.