5 kx #
5 kx # A script to extract binary files from uudecoded files. Ignores all headers
5 kx # and irrelevant stuff. Has shortfalls like all such scripts/programs but works
5 kx # (almost) 100% of the time. We tested it against many such tools available
5 kx # at many ftp sites and found it having higher success rate. There are
5 kx # a few c-programs out there and it is slower as compared to them but it
5 kx # works even in those cases when they fail to work.
5 kx # The only time it will not work is that if uuencoded source file is cut up
5 kx # in many pieces and LAST part contains LESS THAN 3 SOURCE lines in it and
5 kx # we know that such cases (almost) never arise....guarenteed....:)
5 kx #
5 kx # Written by Tahir Zia Khawaja and
5 kx # Nasir Ahmed Noor
5 kx #umnoor@ccu.umanitoba.ca
5 kx #umkhawaj@ccu.umanitoba.ca
5 kx #
5 kx awk '$0 ~ /^begin / {print $0; exit}' $1 > $$gifile
5 kx egrep "^M[^a-z]" $1 >> $$gifile
5 kx awk 'NR > 2 {sl=lr; lr=pr; pr=$0} $1 ~ /^end/ {print sl; print lr; print pr; exit}' $1 >> $$gifile
5 kx uudecode $$gifile
5 kx rm $$gifile