in reply to Re: OT: What happened to uuencode?
in thread OT: What happened to uuencode?

Tried to improve it by adding headers:

#!/bin/sh PATHFILE=$1 SHORTFILE=`basename "$PATHFILE"` perl -i.orig -ple 'BEGIN{$/=undef} $_= "begin 600 $ENV{SHORTFILE}\n". +(pack 'u', $_)."`\nend" if $_' $1
It can be enhanced by checking the file permissions and setting those too, instead of the hardcoded 600