[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: binary files in diff



>> Note perl has the ability to uudecode and encode builtin (perldoc -f
>> pack or unpack and look at the u option.)  As perl is an essential
>> package, by using it you can save yourself a needless dependency.
>
> Ah, that's great.  Can you give a short usage example - I would then
> prepare a patch for the developer's reference.

Maybe something like (in one line)

perl -0777 -e '<> =~ m{^begin[^\n]*\n(.*?\n)`\nend\n}sm or exit(1);  print
unpack("u", $1)' < infile.uu > outfile

To feed some prejudices about perl ;-)

Cheers,
Stefan





Reply to: