shar
shar
(tool, file format)Sharchives are intriguing in that they are typically createdby shell scripts; the script that produces sharchives is thusa script which produces self-unpacking scripts, which maythemselves contain scripts. The disadvantage of sharchivesare that they are an ideal venue for Trojan horse attacksand that, for recipients not running Unix, no simpleun-sharchiving program is possible; sharchives can and do makeuse of arbitrarily-powerful shell features and other Unixcommands.
Different implementations of shar vary in sophistication.Some just uuencode each input file and output commands touudecode the result, others include extensive checking tomake sure the files have been transferred without corruptionand that all parts of a multi-file sharchive have beenunpacked.
The unshar utility strips off mail and news headers beforepassing the remainder of its input to sh.