Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Unix editors w/features for dealing with columnar data?
@ 1995-04-28  4:00 Charles F Randall
  1995-04-28  4:00 ` Larry Felawka
                   ` (5 more replies)
  0 siblings, 6 replies; 25+ messages in thread
From: Charles F Randall @ 1995-04-28  4:00 UTC (permalink / raw)


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?

-Randy

Charles F. Randall, IV                      e-mail: cfrandal@iastate.edu
Systems Analyst                             voice : (515) 294-9316
Computation Center                          office: 113 Durham
Iowa State University	        http://www.public.iastate.edu/~cfrandal/



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  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
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 25+ messages in thread
From: Larry Felawka @ 1995-04-28  4:00 UTC (permalink / raw)


 In article <3nr6nl$cak@news.iastate.edu> cfrandal@iastate.edu (Charles F Randall) writes:
 >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.

 [ ... stuff deleted ...]

 >Is anyone familiar with an editor in the Unix environment with extensive
 >columnar manipulation features like this?

How about Stanford Wylbur?  Surely they have it ported to Unix platforms.

My 2 cents,

_____
Larry



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  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
  1995-05-01  4:00   ` Jon Leech
  1995-05-01  4:00 ` davis
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 25+ messages in thread
From: Jerry Leslie @ 1995-04-30  4:00 UTC (permalink / raw)


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).



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-04-28  4:00 Unix editors w/features for dealing with columnar data? Charles F Randall
                   ` (2 preceding siblings ...)
  1995-05-01  4:00 ` davis
@ 1995-05-01  4:00 ` Barbara Vaughan
  1995-05-03  4:00 ` VITAL
  1995-05-03  4:00 ` Peter da Silva
  5 siblings, 0 replies; 25+ messages in thread
From: Barbara Vaughan @ 1995-05-01  4:00 UTC (permalink / raw)


In article <3nr6nl$cak@news.iastate.edu>, cfrandal@iastate.edu (Charles F Randall) writes:
|> 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'.

[other examples deleted]

|> 
|> Is anyone familiar with an editor in the Unix environment with extensive
|> columnar manipulation features like this?


There are several Unix clones of the IBM CMS XEDIT editor, which has column
editing features such as these.  (I can't swear that it has all of them).
One of these clones is called Uni-Xedit, which is a commercial product.  The 
other is a free program whose name escapes me(THE?).  Both editors are 
mentioned in the comp.editors FAQ, but I have no personal experience of either.

When I first moved to Unix and was given the task of bringing all the other
mainframe users along with me, I thought that the lack of such an editor would
be a major stumbling block.  However, I found that editors such as joe, which
has some column editing features, although not as command driven as mainframe
editors, quickly filled the gap and soon became preferable.  Now on those rare
occasions that I have to use CMS, I find myself wishing for joe or some other
Unix editor.  The need you have now may be transitory.

Barbara Vaughan





^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  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
@ 1995-05-01  4:00 ` davis
  1995-05-01  4:00   ` Anil Joshi
  1995-05-01  4:00 ` Barbara Vaughan
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 25+ messages in thread
From: davis @ 1995-05-01  4:00 UTC (permalink / raw)


 
 >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'.

There are many ways to do this using JED.  For example, one could use
regular expression searches, keyboard macros, etc...  However, if this is a
routine task, I suggest something like the following function:

   define solution_1 ()
   {
     push_spot ();   % save position
     bob ();         % goto beginning of the buffer
     while (bol_fsearch ("1234"))
       {
          goto_column (30);
	  deln (6);
	  insert ("abcdef");
       }
     pop_spot ();    % goto original position 
   }
     
 
 >  Find the lines with '1234' in columns 1-4 and 'dog' starting in
 >  column 5 and insert three spaces starting in column 25.

   define solution_2 ()
   {
     push_spot ();   % save position
     bob ();         % goto beginning of the buffer
     while (bol_fsearch ("1234dog"))
       {
          goto_column (25);
	  insert ("   ");
       }
     pop_spot ();    % goto original position 
   }

 >  Find the lines with 'dog' starting in column 5 and copy columns 25-30
 >  to 30-35.
 
   define solution_3 ()
   {
     push_spot ();   % save position
     bob ();         % goto beginning of the buffer
     while (re_fsearch ("^....dog"))
       {
          goto_column (25);
	  push_mark ();
	  go_right (5);          % Now at column 30 so insert marked region
	  insert (bufsubstr ());
       }
     pop_spot ();    % goto original position 
   }
 
 
 >  Find the lines longer than 35 characters and replace columns 5-24
 >  with 'invalid' (left justified, blank padded)
 
   define solution_4 ()
   {
     push_spot ();   % save position
     bob ();         % goto beginning of the buffer
     do 
       {
          eol ();            % goto end of line
	  if (what_column () > 35)
	    {
	       goto_column (5);
	       deln (19);
	       insert ("invalid");
	       insert_spaces (12);
	    }
       }
     while (down (1));
     pop_spot ();    % goto original position 
   }

The latest version of jed (0.97-6) is available from space.mit.edu in
pub/davis/jed.

--John





^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-01  4:00 ` davis
@ 1995-05-01  4:00   ` Anil Joshi
  1995-05-04  4:00     ` Jason King
  0 siblings, 1 reply; 25+ messages in thread
From: Anil Joshi @ 1995-05-01  4:00 UTC (permalink / raw)


davis@space.mit.edu writes:

> >  Find the lines that have '1234' in columns 1-4 and change
> >  columns 30-35 to 'abcdef'.

>There are many ways to do this using JED.  For example, one could use
>regular expression searches, keyboard macros, etc...  However, if this is a
>routine task, I suggest something like the following function:

>   define solution_1 ()
>   {
>     push_spot ();   % save position
>     bob ();         % goto beginning of the buffer
>     while (bol_fsearch ("1234"))
>       {
>          goto_column (30);
>	  deln (6);
>	  insert ("abcdef");
>       }
>     pop_spot ();    % goto original position 
>   }

There seems to be a misunderstanding here. Unless JED has the kind of column
manipulations that are possible as in XEDIT, ISPF or THE, this kind of
manipulation is hard only through regular expressions. Added to that, you are
asking the users to "program". Leaving that aside, let me ask for a slightly
different kind of a thing.

What if the id number is columns 21-24 instead of 1-4? I don't know JED but am
guessing that bol_search searches from the beginning of the line.

There are somethings that I sorely miss in the (two most popular) unix editors
which are very useful in a variety of situations -

1. "x"clude lines
2. Setting left and right margins aka ISPF editor
3. Floating Ruler
4. Mask lines

Anil


--
Sathsangatve    nissangatvam   From good company to no company
Nissangatve      nirmohatvam   From no company to lack of desire
Nirmohatve    nischalatatvam   From lack of desire to concentration of mind
Nischalatatve  jeevanmuktihi   From concentration of mind to liberation of life



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-04-30  4:00 ` Jerry Leslie
@ 1995-05-01  4:00   ` Jon Leech
  1995-05-02  4:00     ` Jerry Leslie
  1995-05-04  4:00     ` Jason King
  0 siblings, 2 replies; 25+ messages in thread
From: Jon Leech @ 1995-05-01  4:00 UTC (permalink / raw)


In article <3nunr3$g4s@tattoo.sccsi.com>,
Jerry Leslie <jleslie@dmccorp.com> wrote:
>ED can be imbedded in ELM and TIN, where it's being used to write
>this post.

    I'd be curious to know of a Unix editor that *can't* be "imbedded" in
Elm or tin...
    Jon
    __@/



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  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
  1 sibling, 1 reply; 25+ messages in thread
From: Jerry Leslie @ 1995-05-02  4:00 UTC (permalink / raw)


Jon Leech (leech@cs.unc.edu) wrote:
: In article <3nunr3$g4s@tattoo.sccsi.com>,
: Jerry Leslie <jleslie@dmccorp.com> wrote:
: >ED can be imbedded in ELM and TIN, where it's being used to write
: >this post.

:     I'd be curious to know of a Unix editor that *can't* be "imbedded" in
: Elm or tin...
:     Jon
:     __@/

'ex' ?

--Jerry,

 Gerald (Jerry) R. Leslie   jleslie@dmccorp.com    gleslie@isvsrv.enet.dec.com
 Dynamic Matrix Control Corporation                (my opinions are my own)



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-04-28  4:00 Unix editors w/features for dealing with columnar data? Charles F Randall
                   ` (3 preceding siblings ...)
  1995-05-01  4:00 ` Barbara Vaughan
@ 1995-05-03  4:00 ` VITAL
  1995-05-09  4:00   ` Benjamin T. Sugimori
                     ` (4 more replies)
  1995-05-03  4:00 ` Peter da Silva
  5 siblings, 5 replies; 25+ messages in thread
From: VITAL @ 1995-05-03  4:00 UTC (permalink / raw)


In article <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)

Try Crisp 4.2 out. It is commercial though. A demo of it is on:
		ftp.uu.net//vendor/vital/beta
>
>	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?
>
>-Randy
>
>Charles F. Randall, IV                      e-mail: cfrandal@iastate.edu
>Systems Analyst                             voice : (515) 294-9316
>Computation Center                          office: 113 Durham
>Iowa State University	        http://www.public.iastate.edu/~cfrandal/





^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-04-28  4:00 Unix editors w/features for dealing with columnar data? Charles F Randall
                   ` (4 preceding siblings ...)
  1995-05-03  4:00 ` VITAL
@ 1995-05-03  4:00 ` Peter da Silva
  5 siblings, 0 replies; 25+ messages in thread
From: Peter da Silva @ 1995-05-03  4:00 UTC (permalink / raw)


In article <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:
> 

Here's how you do these in ed/edit/ex/vi/sed...

>   Find the lines that have '1234' in columns 1-4 and change
>   columns 30-35 to 'abcdef'.

g/^1234/s/^\(.............................\)....../\1abcdef/

> 
>   Find the lines with '1234' in columns 1-4 and 'dog' starting in
>   column 5 and insert three spaces starting in column 25.

g/^1234dog/s/^\(........................\)/\1   /

>   Find the lines with 'dog' starting in column 5 and copy columns 25-30
>   to 30-35.

g/^....dog/s/^\(........................\)\(......\)...../\1\2\2/

>   Find the lines longer than 35 characters and replace columns 5-24
>   with 'invalid' (left justified, blank padded)

g/^.................................../s/^\(....\)..................../\1invalid            /

>   Change the 2nd and 5th occurrences of 'dog' in lines 300-450 to 'cat'.

300,450s/^\(.*dog.*\)dog\(.*dog.*dog.*\)dog/\1cat\2cat/

> Is anyone familiar with an editor in the Unix environment with extensive
> columnar manipulation features like this?

I assume that the Wylbur commands for the above are more convenient, but
it's possible in ex/vi.
-- 
Peter da Silva                                            `-_-'
Network Management Technology Incorporated                 'U`
1601 Industrial Blvd.     Sugar Land, TX  77478  USA
+1 713 274 5180                                "Har du kramat din varg idag?"



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-01  4:00   ` Anil Joshi
@ 1995-05-04  4:00     ` Jason King
  1995-05-04  4:00       ` Anil Joshi
  0 siblings, 1 reply; 25+ messages in thread
From: Jason King @ 1995-05-04  4:00 UTC (permalink / raw)


joshi@sal.cs.uiuc.edu (Anil Joshi) writes:

>There are somethings that I sorely miss in the (two most popular) unix editors
>which are very useful in a variety of situations -

>1. "x"clude lines
>2. Setting left and right margins aka ISPF editor
>3. Floating Ruler
>4. Mask lines

 well .. i use 'vi(m)' and it gives me 1 & 3 .. using 'par' gives me 2 and i
 don't know what 4 means (Mask lines ??)

 hey .. unless you mean where the lines wrap and begin .. because vim handles
 that as well .. with :set ai and :set co and :set wm .. and i would say that
 vi is on of the two most popular UNIX editors

 btw .. ':set ru' for the ruler (although i may have misunderstood the
 'Floating' part) .. also btw .. you can have all these set up in ~/.exrc
 or in the EXINIT env var

-- 

      jason -- elephant@zeta.org.au -- IRC: elephant -- PGP Key Available




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-01  4:00   ` Jon Leech
  1995-05-02  4:00     ` Jerry Leslie
@ 1995-05-04  4:00     ` Jason King
  1995-05-04  4:00       ` Jerry Leslie
  1 sibling, 1 reply; 25+ messages in thread
From: Jason King @ 1995-05-04  4:00 UTC (permalink / raw)


leech@cs.unc.edu (Jon Leech) writes:

>Jerry Leslie <jleslie@dmccorp.com> wrote:
>>ED can be imbedded in ELM and TIN, where it's being used to write
>>this post.

>    I'd be curious to know of a Unix editor that *can't* be "imbedded" in
>Elm or tin...
>    Jon
>    __@/

 leave the newbies alone jon *8^)

-- jason




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-04  4:00     ` Jason King
@ 1995-05-04  4:00       ` Jerry Leslie
  0 siblings, 0 replies; 25+ messages in thread
From: Jerry Leslie @ 1995-05-04  4:00 UTC (permalink / raw)


Jason King (elephant@zeta.org.au) wrote:
: leech@cs.unc.edu (Jon Leech) writes:

: >Jerry Leslie <jleslie@dmccorp.com> wrote:
: >>ED can be imbedded in ELM and TIN, where it's being used to write
: >>this post.

: >    I'd be curious to know of a Unix editor that *can't* be "imbedded" in
: >Elm or tin...
: >    Jon
: >    __@/

:  leave the newbies alone jon *8^)

: -- jason

The article posted here was written for use in the comp.unix.questions
and comp.os.vms, where lost souls from VMS might look for a familiar
editor.

BTW, when is this newsgroup going to be renamed, since OSF/1 is now
DEC^H^H^H Digital Unix ?

--Jerry,

 Gerald (Jerry) R. Leslie   jleslie@dmccorp.com    gleslie@isvsrv.enet.dec.com
 Dynamic Matrix Control Corporation                (my opinions are my own)



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-04  4:00     ` Jason King
@ 1995-05-04  4:00       ` Anil Joshi
  1995-05-04  4:00         ` davis
  1995-05-09  4:00         ` Jason King
  0 siblings, 2 replies; 25+ messages in thread
From: Anil Joshi @ 1995-05-04  4:00 UTC (permalink / raw)


elephant@zeta.org.au (Jason King) writes:

>>1. "x"clude lines
>>2. Setting left and right margins aka ISPF editor
>>3. Floating Ruler
>>4. Mask lines

> well .. i use 'vi(m)' and it gives me 1 & 3 .. using 'par' gives me 2 and i
> don't know what 4 means (Mask lines ??)

How can you get excluded lines in vi(m)? In vi, you can get a ruler
but it is not a floating ruler. These are done in ISPF using what are called
special lines.

> hey .. unless you mean where the lines wrap and begin .. because vim handles
> that as well .. with :set ai and :set co and :set wm .. and i would say that
> vi is on of the two most popular UNIX editors

Mask lines are something like this.

I set a mask line as follows:

mask	                                /*                          */

Then every time I insert a new line the line gets initalized to the currently
active mask line, i.e. say I "o"pen 5 new lines then I will get

    	                                /*                          */
    	                                /*                          */
    	                                /*                          */
    	                                /*                          */
    	                                /*                          */

I can also overlay lines one on top of another. This will aid in
writing comments in a separate file and overlaying those lines on the
source, for example.

> btw .. ':set ru' for the ruler (although i may have misunderstood the
> 'Floating' part) .. also btw .. you can have all these set up in ~/.exrc
> or in the EXINIT env var

Things are not as complete as they are in ISPF. ISPF integrates a
dialog debugger which will let you break during a DMS session.

No, no, vi won't cut it. Sorry...

>-- 

>      jason -- elephant@zeta.org.au -- IRC: elephant -- PGP Key Available

Anil

--
Sathsangatve    nissangatvam   From good company to no company
Nissangatve      nirmohatvam   From no company to lack of desire
Nirmohatve    nischalatatvam   From lack of desire to concentration of mind
Nischalatatve  jeevanmuktihi   From concentration of mind to liberation of life



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  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
  1 sibling, 2 replies; 25+ messages in thread
From: davis @ 1995-05-04  4:00 UTC (permalink / raw)



In article <3ob8o3$b7v@vixen.cso.uiuc.edu>, joshi@sal.cs.uiuc.edu (Anil Joshi) writes:
 : elephant@zeta.org.au (Jason King) writes:
 : 
 : Mask lines are something like this.
 : 
 : I set a mask line as follows:
 : 
 : mask	                                /*                          */
 : 
 : Then every time I insert a new line the line gets initalized to the currently
 : active mask line, i.e. say I "o"pen 5 new lines then I will get
 : 
 :     	                                /*                          */
 :     	                                /*                          */
 :     	                                /*                          */
 :     	                                /*                          */
 :     	                                /*                          */

   [ I realize that everyone has their own editing style and that one cannot
    objectively say that one is better than the other. However, I just
    wanted to point out that what seems implied by your example can be done
    easily in other Unix editors. ]

In JED any line can be a mask line as you have defined.  JED includes an
extremely useful function called `double_line' that can be bound to a key.
I bind it to `Ctrl-K Ctrl-L'.  As its name suggests, it doubles or
duplicates the current line.  So, if I wanted to create a bunch of lines,
say 6 of your example above, I enter the line once (as you must) then press
`ESC 5 Ctrl-K Ctrl-L'.  This duplicates the current line 5 times (making a
total of 6).

 : I can also overlay lines one on top of another. This will aid in
 : writing comments in a separate file and overlaying those lines on the
 : source, for example.

Is this really useful?  Is the overlay smart enough to watch out for code
that crosses the (hidden) boundary into where the comment overlays itself?
Perhaps it is not a good example because I see no reason to put comments in
a file separate from the source.

--John




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-04  4:00         ` davis
@ 1995-05-04  4:00           ` Anil Joshi
  1995-05-08  4:00           ` Jason King
  1 sibling, 0 replies; 25+ messages in thread
From: Anil Joshi @ 1995-05-04  4:00 UTC (permalink / raw)


davis@space.mit.edu writes:


>   [ I realize that everyone has their own editing style and that one cannot
>    objectively say that one is better than the other. However, I just
>    wanted to point out that what seems implied by your example can be done
>    easily in other Unix editors. ]

I agree whole heartedly. The whole discussion started because somebody
gave an example about how columnar editing can be done easily in JED
and I gave a counter-example and said that these things can be done
easily with xedit or ISPF editors (or clones). Some of these features,
if made available in emacs in emulation mode, then all we have to do to move
the MF shops painlessly to Unix platforms would be to have a REXX interface
to emacs (i.e. along with elisp, have REXX also listen into the editing
that is going on).

>In JED any line can be a mask line as you have defined.  JED includes an
>extremely useful function called `double_line' that can be bound to a key.
>I bind it to `Ctrl-K Ctrl-L'.  As its name suggests, it doubles or
>duplicates the current line.  So, if I wanted to create a bunch of lines,
>say 6 of your example above, I enter the line once (as you must) then press
>`ESC 5 Ctrl-K Ctrl-L'.  This duplicates the current line 5 times (making a
>total of 6).

In ISPF, the mask line is not part of the file. You can have various
mask lines active at various points inthe file.

Also, ISPF has great a way of giving the numeric arguments.

>>Is this really useful?  Is the overlay smart enough to watch out for code
>that crosses the (hidden) boundary into where the comment overlays itself?
>Perhaps it is not a good example because I see no reason to put comments in
>a file separate from the source.

This is a bad example but it can be coupled with other editor procedures
written in REXX to do very sophisticated processing.

>--John

Anil
--
Sathsangatve    nissangatvam   From good company to no company
Nissangatve      nirmohatvam   From no company to lack of desire
Nirmohatve    nischalatatvam   From lack of desire to concentration of mind
Nischalatatve  jeevanmuktihi   From concentration of mind to liberation of life



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-04  4:00         ` davis
  1995-05-04  4:00           ` Anil Joshi
@ 1995-05-08  4:00           ` Jason King
  1 sibling, 0 replies; 25+ messages in thread
From: Jason King @ 1995-05-08  4:00 UTC (permalink / raw)


davis@space.mit.edu writes:

>In JED any line can be a mask line as you have defined.  JED includes an
>extremely useful function called `double_line' that can be bound to a key.
>I bind it to `Ctrl-K Ctrl-L'.  As its name suggests, it doubles or
>duplicates the current line.  So, if I wanted to create a bunch of lines,
>say 6 of your example above, I enter the line once (as you must) then press
>`ESC 5 Ctrl-K Ctrl-L'.  This duplicates the current line 5 times (making a
>total of 6).

 ok .. not that the original 'mask' description was mine (as it appeared) but
 i must step in now to say phooey to JED and to the suggestion that this
 'double_line' function has any worth when compared to the power of 'vi'

 if you wanted what you seem to be after with your 6 identical lines of
 text in 'vi' .. then you would simply preceed the 'o'pen command with the
 number of time that you wanted it duplicated .. in this case 6 .. and
 then whatever you entered once in insert mode would be reproduced 6 times
 once you exit insert mode

 anything i like can be reproduced with fewer keystrokes and no key mappings

 this is without even going into 'vi's ability to copy into and paste out
 of a named register .. JED may be _easier_ to use .. but phooey to any
 claim on power

 the column thing can be done with 'vi' with a special rc file .. but it
 will never be _user_friendly_ in the common sense of the word

-- 

      jason -- elephant@zeta.org.au -- IRC: elephant -- PGP Key Available




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-04  4:00       ` Anil Joshi
  1995-05-04  4:00         ` davis
@ 1995-05-09  4:00         ` Jason King
  1995-05-15  4:00           ` Anil Joshi
  1 sibling, 1 reply; 25+ messages in thread
From: Jason King @ 1995-05-09  4:00 UTC (permalink / raw)


joshi@sal.cs.uiuc.edu (Anil Joshi) writes:

>>>1. "x"clude lines
>>>2. Setting left and right margins aka ISPF editor
>>>3. Floating Ruler
>>>4. Mask lines

>How can you get excluded lines in vi(m)? In vi, you can get a ruler
>but it is not a floating ruler. These are done in ISPF using what are called
>special lines.

 ok (he said sheepishly) so i misread 'x'clude as 'in'clude .. what is 'x'clude
 anyway .. and i'll tell you how to do it in vi

 as for line masking .. this can be done with key mapping .. although obviously
 not as conveniently as ISPFs mask utility .. i like that and it should be
 in vi .. anyway .. i admit inadequacies for you usage .. but still tell me what
 xcluding lines is all about .. doesn't sound too tricky

-- 

      jason -- elephant@zeta.org.au -- IRC: elephant -- PGP Key Available




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-03  4:00 ` VITAL
                     ` (3 preceding siblings ...)
  1995-05-09  4:00   ` Harris Revankar
@ 1995-05-09  4:00   ` Benjamin T. Sugimori
  4 siblings, 0 replies; 25+ messages in thread
From: Benjamin T. Sugimori @ 1995-05-09  4:00 UTC (permalink / raw)
  To: betu

From: betu@netcom.com (VITAL)
Newsgroups: comp.editors,comp.os.ultrix,comp.unix.osf.osf1
Subject: Re: Unix editors w/features for dealing with columnar data?
Date: Wed, 3 May 1995 04:47:29 GMT
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
Message-ID: <betuD7zJz6.Fuq@netcom.com>
References: <3nr6nl$cak@news.iastate.edu>

In article <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)

Try Crisp 4.2 out. It is commercial though. A demo of it is on:
		ftp.uu.net//vendor/vital/beta
>
>	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?
>
>-Randy
>
>Charles F. Randall, IV                      e-mail: cfrandal@iastate.edu
>Systems Analyst                             voice : (515) 294-9316
>Computation Center                          office: 113 Durham
>Iowa State University	        http://www.public.iastate.edu/~cfrandal/






^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-03  4:00 ` VITAL
  1995-05-09  4:00   ` Benjamin T. Sugimori
@ 1995-05-09  4:00   ` Benjamin T. Sugimori
  1995-05-09  4:00   ` Harris Revankar
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 25+ messages in thread
From: Benjamin T. Sugimori @ 1995-05-09  4:00 UTC (permalink / raw)
  To: betu

From: betu@netcom.com (VITAL)
Newsgroups: comp.editors,comp.os.ultrix,comp.unix.osf.osf1
Subject: Re: Unix editors w/features for dealing with columnar data?
Date: Wed, 3 May 1995 04:47:29 GMT
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
Message-ID: <betuD7zJz6.Fuq@netcom.com>
References: <3nr6nl$cak@news.iastate.edu>

In article <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)

Try Crisp 4.2 out. It is commercial though. A demo of it is on:
		ftp.uu.net//vendor/vital/beta
>
>	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?
>
>-Randy
>
>Charles F. Randall, IV                      e-mail: cfrandal@iastate.edu
>Systems Analyst                             voice : (515) 294-9316
>Computation Center                          office: 113 Durham
>Iowa State University	        http://www.public.iastate.edu/~cfrandal/






^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-03  4:00 ` VITAL
@ 1995-05-09  4:00   ` Benjamin T. Sugimori
  1995-05-09  4:00   ` Benjamin T. Sugimori
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 25+ messages in thread
From: Benjamin T. Sugimori @ 1995-05-09  4:00 UTC (permalink / raw)
  To: betu

sorry about that.




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-03  4:00 ` VITAL
                     ` (2 preceding siblings ...)
  1995-05-09  4:00   ` Harris Revankar
@ 1995-05-09  4:00   ` Harris Revankar
  1995-05-09  4:00   ` Benjamin T. Sugimori
  4 siblings, 0 replies; 25+ messages in thread
From: Harris Revankar @ 1995-05-09  4:00 UTC (permalink / raw)
  To: smosna

From: betu@netcom.com (VITAL)
Newsgroups: comp.editors,comp.os.ultrix,comp.unix.osf.osf1
Subject: Re: Unix editors w/features for dealing with columnar data?
Date: Wed, 3 May 1995 04:47:29 GMT
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
Message-ID: <betuD7zJz6.Fuq@netcom.com>
References: <3nr6nl$cak@news.iastate.edu>

In article <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)

Try Crisp 4.2 out. It is commercial though. A demo of it is on:
		ftp.uu.net//vendor/vital/beta
>
>	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?
>
>-Randy
>
>Charles F. Randall, IV                      e-mail: cfrandal@iastate.edu
>Systems Analyst                             voice : (515) 294-9316
>Computation Center                          office: 113 Durham
>Iowa State University	        http://www.public.iastate.edu/~cfrandal/






^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-03  4:00 ` VITAL
  1995-05-09  4:00   ` Benjamin T. Sugimori
  1995-05-09  4:00   ` Benjamin T. Sugimori
@ 1995-05-09  4:00   ` Harris Revankar
  1995-05-09  4:00   ` Harris Revankar
  1995-05-09  4:00   ` Benjamin T. Sugimori
  4 siblings, 0 replies; 25+ messages in thread
From: Harris Revankar @ 1995-05-09  4:00 UTC (permalink / raw)
  To: smosna

From: betu@netcom.com (VITAL)
Newsgroups: comp.editors,comp.os.ultrix,comp.unix.osf.osf1
Subject: Re: Unix editors w/features for dealing with columnar data?
Date: Wed, 3 May 1995 04:47:29 GMT
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
Message-ID: <betuD7zJz6.Fuq@netcom.com>
References: <3nr6nl$cak@news.iastate.edu>

In article <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)

Try Crisp 4.2 out. It is commercial though. A demo of it is on:
		ftp.uu.net//vendor/vital/beta
>
>	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?
>
>-Randy
>
>Charles F. Randall, IV                      e-mail: cfrandal@iastate.edu
>Systems Analyst                             voice : (515) 294-9316
>Computation Center                          office: 113 Durham
>Iowa State University	        http://www.public.iastate.edu/~cfrandal/






^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-02  4:00     ` Jerry Leslie
@ 1995-05-12  4:00       ` Jason King
  0 siblings, 0 replies; 25+ messages in thread
From: Jason King @ 1995-05-12  4:00 UTC (permalink / raw)


jleslie@dmccorp.com (Jerry Leslie) writes:

>: I'd be curious to know of a Unix editor that *can't* be "imbedded"
>: in Elm or tin...
>:     Jon

>'ex' ?
>--Jerry,

 well .. i am laboriously using 'ex' now to post this article .. i tell you what
 i used to use this editor religiously before i knew about 'vi' and before i
 had a full duplex terminal .. god what was i thinking ??

 any editor can be used to post an article .. although vim is certainly my fave
 thanks Bram *8^)

-- jason




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Unix editors w/features for dealing with columnar data?
  1995-05-09  4:00         ` Jason King
@ 1995-05-15  4:00           ` Anil Joshi
  0 siblings, 0 replies; 25+ messages in thread
From: Anil Joshi @ 1995-05-15  4:00 UTC (permalink / raw)


elephant@zeta.org.au (Jason King) writes:

> ok (he said sheepishly) so i misread 'x'clude as 'in'clude .. what is 'x'clude
> anyway .. and i'll tell you how to do it in vi

Here is an example for xcluded lines (and no - it can't be done very easily in vi)

Say my file looks like the following -

int main()
{
	int	i;
	int	j;
	int	a[1000];
	
	for (i=0;i<1000;i++) {
           a[i] = 0.0;
	   j++;
	}	
}

I can do several of the following -

1. x all word i 
gives

int main()
{
.................................. 1 line excluded
	int	j;
	int	a[1000];
	
.................................. 2 lines excluded
	j++;
	}
}

2. find all a

will pop all those lines which have a back into view thusly

int main()
{
.................................. 1 line excluded
	int	j;
	int	a[1000];
	
.................................. 1 lines excluded
        	a[i] = 0.0;
		j++;
	}
}

3. One can limit find and replace operations only on the unexcluded lines etc. 

4. Reverse excluded-unexculded lines

5. Show commands work with the indentations - you can unfold things
like if-then-else blocks etc.


> as for line masking .. this can be done with key mapping .. although obviously
> not as conveniently as ISPFs mask utility .. i like that and it should be
> in vi .. anyway .. i admit inadequacies for you usage .. but still tell me what
> xcluding lines is all about .. doesn't sound too tricky

I think it can't be done in vi - may be parts of it but not the whole thingy...

>-- 

>      jason -- elephant@zeta.org.au -- IRC: elephant -- PGP Key Available

Anil

--
Sathsangatve    nissangatvam   From good company to no company
Nissangatve      nirmohatvam   From no company to lack of desire
Nirmohatve    nischalatatvam   From lack of desire to concentration of mind
Nischalatatve  jeevanmuktihi   From concentration of mind to liberation of life



^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~1995-05-15  4:00 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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   ` Benjamin T. Sugimori
1995-05-09  4:00   ` Harris Revankar
1995-05-09  4:00   ` Harris Revankar
1995-05-09  4:00   ` Benjamin T. Sugimori
1995-05-03  4:00 ` Peter da Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox