In article <[log in to unmask]>, "Gregory.Stigers"
<[log in to unmask]> wrote:

> I assume that this is a simple problem that someone here has already
> solved... Receiving a record on an Wintel platform, record can vary in
> length, and are of course terminated with CRLF. What the next step
> requires is that these same records be space filled to the end of a
> fixed record length, and still terminated with CRLFs. Sounds like it
> ought to be pretty simple, but with More Than One Way To Do It.
>

Not sure why you'd want to do all this, but something like:

perl -l -p -e 'BEGIN{$\ = $/ = "\r\n"}{$_ .= q( ) x (80-length)}'


should do the trick. Reads and writes from/to stdin/stdout, pads with
spaces to 80 (and won't complain if input is longer than this).

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *