Directory management shell

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Feb 9 06:16:55 AEST 1989


In article <458 at uvabick.UUCP> matthew at 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.)



More information about the Comp.unix.questions mailing list