T.R | Title | User | Personal Name | Date | Lines |
---|
3327.1 | How's this? | SMAUG::SPODARYK | Binary Throttle | Thu Jan 11 1990 23:07 | 11 |
| Just the other day I wrote a quick C program to do that.
It currently removes _most_ characters < ASCII 32 (space),
but I can certainly modify it to remove CRs and leave
TABs, ESCs, etc. It's very basic, but should do the job for you.
I'll get it compiled on my Amiga, and then I'll upload it
to:
whammy::dka300:[public]strip.zoo
~Steve
|
3327.2 | thanks | UBEAUT::MANDERSON | Monday oneday, Tuesday the next | Fri Jan 12 1990 00:01 | 2 |
| mucho appreciated.
kevin
|
3327.3 | I assume you mean for the Amiga | MSVAX::BARRETT | Who is Steve Dahl? | Fri Jan 12 1990 00:03 | 4 |
| Re: .0
On one of the FISH disks is a series of 3 programs that will remove
or replace CR, LF, CRLF (forget which disk offhand).
|
3327.4 | any ideas on the names? | UBEAUT::MANDERSON | Monday oneday, Tuesday the next | Fri Jan 12 1990 00:04 | 4 |
| I had a hunt thru the fisk and couldn't find it - any idea of thye
names??
thanks kevin
|
3327.5 | TxEd | LEVERS::PLOUFF | can't memorize Zen... | Fri Jan 12 1990 10:32 | 6 |
| The TxEd editor has a menu selection to strip carriage returns,
and the version I got came with two standalone conversion programs,
one to strip CRs and one to insert them (before transfer to MS-DOS
machines). No doubt TxEd Plus offers this feature too.
Wes
|
3327.6 | | BOMBE::MOORE | BaN CaSe_sEnSiTiVe iDeNtIfIeRs! | Fri Jan 12 1990 19:32 | 1 |
| It's in the Dillon collection on Fish disks 168 & 169.
|
3327.7 | Matt Dillon beat me to it... | SMAUG::SPODARYK | Binary Throttle | Sat Jan 13 1990 03:29 | 65 |
| Oh well, I just finished my new version ( I like late night hacking ;^).
It's located at whammy::dka300:[public]strip.zoo
and here's the README...
~Steve
------
Makeshift README pulled from the comments...
/*
* Stephen Spodaryk - 12-jan-1989
* smaug::spodaryk
* [email protected]
*
* strip.c -
*
* A program to strip unwanted characters out of an ASCII file.
*
* Takes several arguments. $ strip infile outfile ...
*
* The characters to strip must be specified after the outfile.
*
* They can be specified in several forms.
*
* alphabetic: A Z g %
* hexadecimal: 0x41 0x5A 0x67 0x25
* decimal: 0d65 0d90 0d103 0d37
*
* The '0d' and '0x' allow me to differentiate between
* possible ambiguities such as '0' and 0. Should the
* character '0' be removed, or should the NULL character?
*
* They may also be specified as a range of start - finish
* using combinations of the legal formats, such as:
*
* A - 0x5A
* 0d65 - Z
*
* To remove the "-" character, just specify it after a range,
* or as the first character. That will work fine.
*
* The error handling is fairly good, but semi-unforgiving. Use
* a format as shown above, and don't try things like "nerd",
* or 0x$#c. They will be fatal.
*
* General Tips:
*
* Also note that on some systems specifying wildcard characters
* such as * or % will be expanded before the program is invoked.
* This will usually yield undesireable results. To play it safe
* you might want to use quotes around the character, like so "*".
*
* I have also encountered some systems ( I won't mention which )
* that will uppercase the arguments before passing them to the
* program. Again, if this it true of your environment, use
* quotes to preserve case.
*
* It's written in 'standard' C. There are probably things I
* should add, but it's really quite late. If you find a bug,
* let me know (or fix it yourself). Hope it's a help.
*
*/
|
3327.8 | thanks steve | UBEAUT::MANDERSON | Monday oneday, Tuesday the next | Sun Jan 14 1990 15:52 | 3 |
| a million thanks to steve for helping me out.
kevin
|
3327.9 | STRIP.ZOO still available? | AKOV11::SMITH | Reality, just a visible imagination? | Tue Apr 10 1990 12:13 | 14 |
| Re .7
Steve,
Can you post STRIP.ZOO to TAPE::USER2:[UPLOAD]? I tried to access it
in the location you specified but no luck. Does it compile on a VAX?
I have some text files with hard <CR> and <LF> (^M and ^J) imbeded that
I'd like to remove. Can your STRIP handle this? How would you specify
the <CR> and <LF> characters?
Thanx,
...Ed
|
3327.10 | now available at TAPE::USER2:[UPLOAD]strip.zoo | WHAMMY::SPODARYK | Binary Throttle | Tue Apr 10 1990 16:17 | 25 |
| Sure thing.
The `readme' file:
Usage: $ strip infile outfile ...
Where ... is a character, a hex or decimal value, or a range.
Ie: $ strip infile outfile 0d0 - 0x09 0x0B a - z
will strip characters 0 through 9, 11, and lowercase a to z
So, to get rid of <CR> use 0d13 or 0x0D
<LF> use 0d10 or 0x0A
$ strip infile outfile 0d13 0d10
strip.c will compile nicely for VMS (/standard=portable even :^).
Just remember to use a foreign command. (VMS$ strip := $disk:[dir]strip.exe)
For more info, see the opening documentation. It's not pretty, but it works.
Steve
--I should have probably allowed some mnemonics like CR, FF, LF, ESC...
but I wanted to keep the CLI parsing real simple. Maybe I'll do that.
|
3327.11 | VMS version, works like a charm... | AKOV11::SMITH | Reality, just a visible imagination? | Wed Apr 11 1990 10:43 | 9 |
| Thanx Steve,
I complied a VMS version and it works great. If anyone else is interested I
uploaded STRIP.EXE to TAPE::USER2:[UPLOAD]
Cheers,
...Ed
|