shar

From Wikipedia, the free encyclopedia

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.

[edit] VMS_Shar and VMS_Share

In 1987, Michael Bednarek from the IAESR at the University of Melbourne developed a script for a similar purpose in pure DCL for the VMS operating system under the name VMS_Shar version 2.[1]

The main purpose of this script was to allow the distribution of formatted program code through e-mail and Usenet newsgroups because a) mail transfer agents and NNTP server software only allowed printable ASCII characters (32–126); b) they tended to strip leading and trailing blanks and 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 TPU text editor editor which then became the main engine of the script. Version 5 protected control characters like TAB, ESC, BEL. In 1988, beginning with version 6, the script was then extended by James A. Gray from Xerox[2]. Starting with version 7, Andy Harper from King's College London continued the development;[3]. The current version (as of 2008) is 8.5 (1994)[4]

[edit] See also

[edit] References

  1. ^ Michael Bednarek (9 June 1987). "shar (sort of) for VMS". comp.os.vms. (Web link). Retrieved on 2008-02-09.
  2. ^ Jim Gray (8 May 1988). "VMS_SHARE V6.0". comp.os.vms. (Web link). Retrieved on 2008-02-09.
  3. ^ Andy Harper (6 July 1989). "VMS_SHARE version 7". comp.os.vms. (Web link). Retrieved on 2008-02-09.
  4. ^ Andy Harper (5 July 1995). "Announcing VMS_SHARE 8.5". vmsnet.sources.d. (Web link). Retrieved on 2008-02-09.

[edit] External links

Languages