From: jleslie@dmccorp.com (Jerry Leslie)
Subject: Re: Unix editors w/features for dealing with columnar data?
Date: 1995/04/30 [thread overview]
Message-ID: <3nunr3$g4s@tattoo.sccsi.com> (raw)
In-Reply-To: 3nr6nl$cak@news.iastate.edu
Charles F Randall (cfrandal@iastate.edu) wrote:
: We're moving a large numbers of users from a mainframe environment to
: Unix. Some of them have large data files which can be described in the
: following manner: (trivial example)
: Columns Description
: ------- -----------
: 1-4 id number
: 5-24 name
: 25-30 dat1
: 30-35 dat2
: ... etc
: In essence, they've got what I call fixed column data. (not whitespace
: separated - I'm mainframe-challenged, sorry for the wording) They're
: used to using Stanford Wylbur (not the same as some commercial Wylbur
: implementations) to do their editing tasks.
: They do things like:
: Find the lines that have '1234' in columns 1-4 and change
: columns 30-35 to 'abcdef'.
: Find the lines with '1234' in columns 1-4 and 'dog' starting in
: column 5 and insert three spaces starting in column 25.
: Find the lines with 'dog' starting in column 5 and copy columns 25-30
: to 30-35.
: Find the lines longer than 35 characters and replace columns 5-24
: with 'invalid' (left justified, blank padded)
: Change the 2nd and 5th occurrences of 'dog' in lines 300-450 to 'cat'.
: I've given them a three hour course on Unix Tools (ending with sed, awk,
: and Perl) and I've shown them examples using the standard Unix tools but
: they're used to interactively editing these files.
: Is anyone familiar with an editor in the Unix environment with extensive
: columnar manipulation features like this?
The multi-platform ED editor has a box mode.
ED is a public domain editor patterned after DEC VMS' EDT editor, but
with many extensions, such as box-mode cut-and-paste, editing of binary
files, remote editing via ftp, and a built-in news reader. Since it is
patterned after VMS' EDT editor, it includes keystroke-level journaling,
to prevent loss of work due to a system crash or power failure. One
difference between EDT and ED is that ED doesn't make the cut buffer reverse
video yet.
ED runs on: MS-DOS, OS/2, Windows-NT, VMS VAX, VMS AXP. It runs on
every Unix the co-author could get access to: AIX, HP-UX, OSF/1, NeXT,
BSD/386, Linux, Ultrix, SunOS, etc.
ED can be imbedded in ELM and TIN, where it's being used to write
this post. ED includes online help, for those who need some reminders.
ED should not be confused with the ed line-mode editor on some dialects
of Unix. ED may be installed under any name: edt, dwim.
A copy of the original email announcement from ED's co-author, Charles
Sandmann, clio.rice.edu, follows.
--Jerry,
Gerald (Jerry) R. Leslie
Staff Engineer
Dynamic Matrix Control Corporation (my opinions are my own)
P.O. Box 721648 9896 Bissonnet
Houston, Texas 77272 Houston, Texas, 77036
713/313-5065 713/313-5200 (fax)
jleslie@dmccorp.com
gleslie@isvsrv.enet.dec.com
=============================================================================
"This note is being sent to you since you have stated interest in ED or are a
current user. If you would like to be removed from this list or have someone
added, let me know.
V1.5.7 of ED fixes many bugs and adds a few enhancements requested by you,
the user group, of ED. The primary FTP site remains riceng.rice.edu,
username rhrsoft, password rhrsoft. The DOS binary distribution and the
source distribution (which builds everywhere) as also been installed on
Simtel mirrors (Oak.Oakland.edu for example) in ZIP format as
pub/msdos/editor/edrhr15*.zip for those of you needing anonymous FTP or a
well known site. Below is the announcement from the Simtel update.
ED v1.5.7 is an editor with a VMS/EDT like user interface, but provides
significantly enhanced features. Multiple windows allow you to display
many files on the screen simultaneously. Additional enhancements
include a file manager interface, ability to save key definitions,
editing by wildcards, an imbedded calculator, automatic program
identation, parenthesis matching, box/column editing features,
insert/overstrike modes, and sorting functions. ED has no file size
limits and can edit binary files also. The source distribution will
build on virtually any platform, which allows you to have the same
editor on all systems. ED can be used immediately without training by
EDT users, and they can use the enhanced features at their own pace.
For systems with a supported TCP/IP package, ED can be used as a file
manager and editor across the network to remote nodes. There is also
a simple, fast imbedded news reader included with TCP/IP support."
=============================================================================
{ Naturally, ED comes with help}
Command>help
HELP
This is an online help library for the ED editor, a multi-window text and
binary file editor. For information about how this library works, enter "HELP".
ED works on a variety of terminals, and you can teach it how to deal with new
terminals with relatively little trouble. See the help topic 'terminals' for
more information about this.
Additional information available:
ABORT ascii BOOKMARK box_mode BIGGER BYTE
CALCULATE CD changing_case commands
defining_keys DELETE DATE EXIT features
FILE ftp GREP HELP INCLUDE
invoking_ed keypad LOAD mark PERG
prompts PWD QUIT recall_commands recovery
repeats RESTORE search SET SHOW SMALLER
SORT startup STORE SUBSTITUTE tabs terminals
TIME TRIM UNLOAD wildcards windows WRITE
HELP subtopic? >
==============================================================================
Command>help box_mode
box_mode
The SET BOX ON command puts ED in "box cut/paste" mode. In box mode, you can
cut rectangular areas out of your file, and paste them in elsewhere, preserving
their rectangular shape. The idea is to make it easy to cut a table and move it
somewhere else. Suppose you are looking at some text that looks like this:
Now is the time
For all good men
To come to the aid
Of their country.
If you moved to the i in 'is', hit SELECT, moved to the u in 'country', and hit
CUT, in normal cut mode the result would be:
Now untry.
and the paste buffer would contain:
is the time
For all good men
To come to the aid
Of their co
In normal cut mode, ED removes all characters from the beginning of the select
range to its end, including the "line breaks" that separate lines of the file
from each other. In box mode, what gets cut is always a rectangular area,
bounded on opposite corners by the cursor and the select marker. In the above
case, the box cut result would be:
Now ime
For men
To che aid
Of tntry.
and the paste buffer would contain:
is the t
all good
ome to t
heir cou
Thus in box mode, the number of lines in the file remains constant; only a sec-
tion of each line in a group gets cut. When you paste in box mode, ED inserts
the rectangular area you previously cut, starting at the cursor position, by
making a space in the middle of each line, and inserting data from the paste
buffer. This keeps the entire rectangle of data together.
Box mode does not affect other kinds of deletion from the file: DELC, DELW,
DELL, deletion/replacement of search strings, and SUBST work in the normal way
regardless of the box mode state. Only CUT and APPEND perform the box mode
operation, and only if you enable it.
Note: when you use box cut and paste, ED converts all TAB characters in the
affected lines to spaces. Also, box mode doesn't work in any useful way when
you are in binary or hex mode (using the -b and -h options when you invoke ED).
next prev parent reply other threads:[~1995-04-30 4:00 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-04-28 4:00 Unix editors w/features for dealing with columnar data? Charles F Randall
1995-04-28 4:00 ` Larry Felawka
1995-04-30 4:00 ` Jerry Leslie [this message]
1995-05-01 4:00 ` Jon Leech
1995-05-02 4:00 ` Jerry Leslie
1995-05-12 4:00 ` Jason King
1995-05-04 4:00 ` Jason King
1995-05-04 4:00 ` Jerry Leslie
1995-05-01 4:00 ` davis
1995-05-01 4:00 ` Anil Joshi
1995-05-04 4:00 ` Jason King
1995-05-04 4:00 ` Anil Joshi
1995-05-04 4:00 ` davis
1995-05-04 4:00 ` Anil Joshi
1995-05-08 4:00 ` Jason King
1995-05-09 4:00 ` Jason King
1995-05-15 4:00 ` Anil Joshi
1995-05-01 4:00 ` Barbara Vaughan
1995-05-03 4:00 ` VITAL
1995-05-09 4:00 ` Benjamin T. Sugimori
1995-05-09 4:00 ` Harris Revankar
1995-05-09 4:00 ` Benjamin T. Sugimori
1995-05-09 4:00 ` Harris Revankar
1995-05-09 4:00 ` Benjamin T. Sugimori
1995-05-03 4:00 ` Peter da Silva
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox