home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn Exec 3
/
CD_Magazyn_EXEC_nr_3.iso
/
Recent
/
text
/
edit
/
WordCount-CED.readme
< prev
next >
Wrap
Text File
|
2000-07-23
|
2KB
|
34 lines
Short: Fast line/word/character counting ARexx hack for CED
Author: Matthias.Bethke@gmx.net
Uploader: Matthias.Bethke@gmx.net
Version: 1.3
Type: text/edit
Requires: wc (from the GeekGadgets textutils package, ftp.ninemoons.com)
This is a quick ARexx hack I threw together (forgive the probably not very
nice code - I'm neither experienced in ARexx nor too keen on improving it
stylistically) to quickly count lines, words and characters in a file or
marked block in CygnusEd. It basically saves the block to a temp file, runs
"wc" (the Unix "word count" command) on it, grabs its output and displays
it in a CED requester. Oh, and it deletes the temp files, too :-)
Installation: Just copy it to your HD (preferably to REXX:ced/) and use the
"Special -> Dos/ARexx Interface -> Install Dos/Arexx command" menu to bind
it to some key. No arguments required.
Advantages:
- Fast. The "Word-Count-File.ced" macro takes ages for the same job.
- Flexbile. Well, more flexible than the former that is, although that
doesn't tell much. It can process blocks, too, that's about it.
Disadvantages:
- Needs temporary storage. This is currently in T:, i.e. you have to have
enough free RAM for the temp file plus wc (which in turn loads
ixemul.library, if you don't have it loaded anyway!). If you don't like
that, set it to some directory on your HD (masochists: use Floppies or
ParNet drives 8-))
- Kills the current copy buffer. Even without a marked block it has to mark
and copy the entire file first :-( If anybody knows how to save a copy to
another file without permanently changing the current fil's name in CED,
tell me!