Path: utzoo!attcan!uunet!husc6!tut.cis.ohio-state.edu!lvc From: lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) Newsgroups: comp.unix.questions Subject: Re: Changing directories in ksh... Message-ID: <16910@tut.cis.ohio-state.edu> Date: 4 Jul 88 14:11:38 GMT References: <5318@dasys1.UUCP> Organization: The Ohio State University Dept of CIS Lines: 27 In article <5318@dasys1.UUCP> pepper@dasys1.UUCP (Angeli "Ms. Pepper" Wahlstedt) writes: > >Normally, I'd have an alias in "csh" that looks like this: > > alias down 'cd \!^; ls' > >But, here's the fun part...how do I do the same thing in ksh?? Shell >scripts ain't the answer, because once I get to a new directory, I want >to STAY there. Also, ksh's alias isn't as...ummm...err..."intelligent" >as csh's alias. This is a weakness in ksh, but there is a work around. Use a ksh function: function down { cd "${@}" ; ls } and put it in your .profile or ENV file. You could put quote marks around the cd and ls if you don't want alias processing on them. -- Larry Cipriani, AT&T Network Systems and Ohio State University Domain: lvc@tut.cis.ohio-state.edu Path: ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!lvc (strange but true)