HP3000-L Archives

January 1998, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Frank Letts <[log in to unmask]>
Reply To:
Frank Letts <[log in to unmask]>
Date:
Fri, 30 Jan 1998 09:56:13 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (82 lines)
Fernac-
Or, in posix, 'tr -d "015" < filename > filename'

That will remove the newlines, but beware that a bug lurks there.  A fe lines will be cloned and stuffed at the end of file.
The are easy to identify, tho - they all have new lines (^M).

[log in to unmask]

Dr. Ferenc Nagy wrote:

> On Wed, 28 Jan 1998, Kevin J. Mullins wrote:
>
> > We have an ASCII file that contains a carriage return and line feed
> > character as a delimiter at the end of the data contained in each record
> > following by trailing spaces to fill out the record.
> >
> > Looking for an easy way to strip out these two characters from each record.
> > Was hoping to use EDITOR and MPEX to accomplish this but have not found a
> > solution.  Contacted VESOFT for possible answers but they did not manage to
> > come up with anything within the past day.
> >
> > Any ideas how this can be done fairly simply?  We could create a quick
> > program to do this but really are looking for other options.
> >
>
> Hi Kevin,
>
> If you can transfer your files to an IBM PC, and you have Turbo Prolog
> or PDC Prolog then you can replace the CR LF sequence in its editor
> window.
> The search and replace in these systems works with repeated function keys.
> [f4]old text[f4]new text[f4]
> The old text can contain CR LF sequence:
> Type
> [f4][return][f4][f4]
> This editor is among the standard predicates of the Prolog, so I could
> write simple PORTABLE editor programs, which invoke the editor behaving
> similarly.
> I attach three version of them, running under DOS:
> The smallest one is compiled under Turbo Prolog 2.0.
> Invoke it with an optional starting position and file mask>:
> PROLEDIT -123 ab*.cd?
> At first you can choose color then you can choose a file matching with the
> mask. Then you can select the color of the editor window.
> F1 invokes help.
> Show help file within help displays the Hungarian help file (Code table
> CWI 850)
> F4 invokes search and replace as above.
> F10 saves the file and quits program.
> F8  Invokes auxiliary editor.
> Esc quits the program after a question about saving.
>
> The version PROLED1.EXE was compiled with PDC Prolog.  The version
> PROLED2.EXE has four parameters where the starting positions are optional.
>
> PROLED2 -pos1 edited_file -pos2 instruction_file
>
> It displays two files in separate windows. The instruction file is read
> only.
> The attached archive contains two versions of the standard Prolog error
> mesage file. The source file show how smart language are Turbo
> Prolog (R) [Borland] and PDC Prolog (R) [Prolog Development Center,
> Denmark].
>
>                         Good luck
>                                                        Frank
>
>   |\    /~ ~~|~~~ Family : NAGY; first name : FERENC; title : Ph. D.
>   | \   |    |    Institute of Isotope and Surface Chemistry
>   |  \  |   -+-   H-1121 BUDAPEST Konkoly-Thege M. ut 29, (1525 Bp. POB 77)
>   |   \ |    |    [log in to unmask]  (36-1)-395-9123 Fax: ~395-9002
>   |    \|    |    http://alpha0.iki.kfki.hu/~nagyf/
> `-'     '  `-'    Home: H-1102 BUDAPEST Holgy u. 48. I. 8. (36-1)-262-1198.
> The lazy man gets tired twice, the miser pays doubly.
>
>                                                   ------------------------------------------------------------------------
>
>                          Name: proledit.zip
>    proledit.zip          Type: Zip Compressed Data (application/x-zip-compressed)
>                      Encoding: BASE64
>                   Description: Portable editors able to replace CR LF with any text

ATOM RSS1 RSS2