Shar
240107
225034571
2008-07-11T15:54:36Z
Dicklyon
869314
/* References */ don't need multiple columns for a handful of refs
{{otheruses4|an archival file format|other uses|Shar (disambiguation)}}{{lowercase}}__NOTOC__
In the [[Unix]] [[operating system]], '''shar''' is an abbreviation of ''SHell ARchive''. A shell [[archive]] is a [[shell script]], and executing it will recreate the files. Directories are not recreated. This is a type of self extracting archive file. It can be created with the Unix 'shar' utility. To unarchive the files, only the standard [[Unix]] [[Bourne shell]] 'sh' is usually required. While the shar format has the advantage of being pure text, it poses a risk due to being executable; hence the older and more general [[tar file format]] is usually preferred even for transferring text files. [[GNU]] provides its own version of shar in the [[GNU Sharutils]] collection.
"unshar" programs have been written for other operating systems but are not always reliable; .shar files are shell scripts and can theoretically do anything that a shell script can do (including using incompatible features of enhanced or workalike shells), limiting their utility outside the Unix world.
==VMS_Shar and VMS_Share==
In 1987, Michael Bednarek from the [[The Melbourne Institute of Applied Economic and Social Research|IAESR]] at the [[University of Melbourne]] developed a script for a similar purpose in pure [[DIGITAL Command Language|DCL]] for the [[OpenVMS|VMS]] operating system under the name '''VMS_Shar''' version 2.<ref>{{cite newsgroup
|title = shar (sort of) for VMS
|author = Michael Bednarek
|date = {{date|1987-06-09}}
|newsgroup = comp.os.vms
|id = 1261@murdu.OZ
|url = http://groups.google.com.au/groups?selm=1261@murdu.OZ
|accessdate = 2008-02-09}}</ref>
The main purpose of this script was to allow the distribution of formatted program code through e-mail and [[Usenet newsgroup]]s because a) [[mail transfer agent]]s and [[NNTP]] server software only allowed printable [[ASCII]] characters (32–126); b) they tended to strip leading and trailing blanks and [[Tab key|TAB]] characters; c) and they ususally broke lines longer than 80 characters. VMS_SHAR protected leading blanks, and it split long files into parts of less than 16,000 bytes.
Version 4 introduced the protection of trailing blanks using the [[Text Processing Utility|TPU]] text editor editor which then became the main engine of the script. Version 5 protected control characters like TAB, [[Esc key|ESC]], [[Bell character|BEL]]. In 1988, beginning with version 6, the script was then extended by James A. Gray from [[Xerox]]<ref>{{cite newsgroup
|title = VMS_SHARE V6.0
|author = Jim Gray
|date = {{Date|1988-05-08}}
|newsgroup = comp.os.vms
|id = 880508-073131-5929@Xerox
|url = http://groups.google.com.au/groups?selm=880508-073131-5929@Xerox
|accessdate = 2008-02-09}}</ref>. Starting with version 7, Andy Harper from [[King's College London]] continued the
development;<ref>{{cite newsgroup
|title = VMS_SHARE version 7
|author = Andy Harper
|date = {{Date|1989-07-06}}
|newsgroup = comp.os.vms
|id = 8907061417.AA16991@ucbvax.Berkeley.EDU
|url = http://groups.google.com.au/groups?selm=8907061417.AA16991@ucbvax.Berkeley.EDU
|accessdate = 2008-02-09}}</ref>. The current version (as of 2008) is 8.5 (1994)<ref>{{cite newsgroup
|title = Announcing VMS_SHARE 8.5
|author = Andy Harper
|date = {{Date|1995-07-05}}
|newsgroup = vmsnet.sources.d
|id = 1994Jul5.164105.3667@bay.cc.kcl.ac.uk
|url = http://groups.google.com.au/groups?selm=1994Jul5.164105.3667@bay.cc.kcl.ac.uk
|accessdate = 2008-02-09}}</ref>
==See also==
*[[Archive formats]]
*[[List of Unix utilities]]
== References ==
{{reflist}}
==External links==
* {{man|1|shar}}
*[http://lib.stat.cmu.edu/general/shar Information about shar files (Carnegie Mellon)]
{{Archive formats}}
[[Category:Unix software]]
[[Category:Linux software]]
[[Category:Archive formats]]
[[es:Shar]]