>>>>> "Kai" == Kai Grossjohann <[EMAIL PROTECTED]> writes:
> Just `cat /file' doesn't seem to be right, somehow.  Use `uuencode'
> and `uudecode'?  Is that available on all systems?

uuencoding seems overkill.  It's probably enough to use an end-of-file marker
like "EOF" and to make sure it won't appear in the encoded file:

        sed -e 's/EOF/EOFF/g' <file>; echo EOF

decoding is straightforward as well.

admittedly, using sed is a bad idea since many sed implementations deal
very badly with binary files.  One could instead rely on statistics
rather than on encoding to ensure the end-of-file marker never appears
by using something like:

        cat <file>; echo <random-string-with-date>

this is the approach taken in most MIME multipart encodings (where
the separator is chosen randomly, hoping it won't appear in any
of the subparts).  By making the random string sufficiently long
and random, you can arbitrarily reduce the probability of it appearing
in the file.


        Stefan

Reply via email to