*BSD News Article 26660


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:8342 comp.unix.questions:45053
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!decwrl!nic.hookup.net!swrinde!cs.utexas.edu!geraldo.cc.utexas.edu!sylvester.cc.utexas.edu!not-for-mail
From: vax@sylvester.cc.utexas.edu (Vax)
Newsgroups: comp.os.386bsd.questions,comp.unix.questions
Subject: Small Programs Request
Date: 28 Jan 1994 10:06:45 -0600
Organization: The University of Texas - Austin
Lines: 26
Message-ID: <2ibd6l$m2d@sylvester.cc.utexas.edu>
NNTP-Posting-Host: sylvester.cc.utexas.edu

I am wondering if there are some small programs around which would help me
in my programming projects.  Please mail me if you know of any which fit
the following descriptions:

1) A small, fast program to select a single line from a file.  This might
be used, for example, if you have 20 possible sed scripts, and wish to select
them one at a time.  One file might hold the 20 sed commands, and a batch file
would invoke:
	sed `select_line 7 from-file` input_files > output
Of course, I could always use awk, but that would be cheating.

2) A text-based (curses?) program which allows you to select a line, or many
lines, from a file or stdin, and pipe them to another program.  For example,
there is an MS-DOS program called "multimove" which allows you to use the
"+" key to mark files, and the "arrow" keys to move around in a list of files,
and when you hit "enter" it moves them all to a destination.  This could
be duplicated and made more powerful under Unix by writing:
	rm `ls * | mark_lines`
Of course, it could be used in conjunction with xargs.
This program would allow me to maintain tar(1) archives easier.
Obviously any editor could be used, but the arrow keys, +/-, space to toggle,
return to end, pgup/pgdn, and some keys to mark all or unmark all would be
more intuitive and require less keystrokes.
-- 
Protect our endangered bandwidth - reply by email.  NO BIG SIGS!
VaX#n8 vax@ccwf.cc.utexas.edu - Don't blame me if the finger daemon is down