Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.unix.questions Subject: Re: Directory management shell Message-ID: <9623@smoke.BRL.MIL> Date: 8 Feb 89 20:16:55 GMT References: <458@uvabick.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 22 In article <458@uvabick.UUCP> matthew@uvabick.UUCP (Matthew D. Lewis) writes: >Is there such a thing as a directory management shell for a Unix system, >something along the lines of the DOS shells? I have a directory (or two :-) >full of text files which I need to sort out. Something that would help make >this process less tedious would be appreciated. Not being familiar with "DOS shells" I'm not sure what it is that you really want, but there should be no problem using the Bourne shell to shuffle through files etc. For example, I often do for i in * do opg $i # my paginator, similar to "more" if ask Remove $i\? then rm -f $i fi done "ask" is a little utility inspired by one John Quarterman came up with when we worked at the same company years ago, that asks the question, gets a Y or N response, and exits with appropriate status. It comes in really handy for uses such as this one. You could also use "pick" as described in Kernighan & Pike's "The UNIX Programming Environment" for selecting subsets of files, but "ask" is better for browsing. (It's provided as part of the Adventure Shell distribution.)