File shquote.icn

Summary

###########################################################################

	File:     shquote.icn

	Subject:  Procedures to quote word for UNIX-like shells

	Author:   Robert J. Alexander

	Date:     December 30, 1993

###########################################################################

   This file is in the public domain.

###########################################################################

  The following procedures are useful for writing Icon programs that
  generate shell commands.  Certain characters cannot appear in the
  open in strings that are to be interpreted as "words" by command
  shells.  This family of procedures assists in quoting such strings so
  that they will be interpreted as single words.  Quoting characters
  are applied only if necessary -- if strings need no quoting they are
  returned unchanged.

  shquote(s1, s2, ..., sN) :  s -- Produces a string of words s1, s2,
  ..., sN that are properly separated and quoted for the Bourne Shell
  (sh).

  cshquote(s1, s2, ..., sN) :  s -- Produces a string of words s1, s2, ..., sN 
  that are properly separated and quoted for the C-Shell (csh).

  mpwquote(s1, s2, ..., sN) :  s -- Produces a string of words s1, s2,
  ..., sN that are properly separated and quoted for the Macintosh
  Programmer's Workshop shell (MPW Shell).

  dequote(s1,s2) : s3 -- Produces the UNIX-style command line word s1
  with any quoting characters removed. s2 is the escape character
  required by the shell (s2 defaults the the usual UNIX escape
  character, the backslash "\\").

###########################################################################
Procedures:
cshquote, dequote, mpw_escape_proc, mpwdequote, mpwquote, shquote, shquote_words

This file is part of the (main) package.

Source code.

Details
Procedures:

cshquote(s)


dequote(s, escapeString, escapeProc)


mpw_escape_proc(ch)


mpwdequote(s)


mpwquote(s)


shquote(s)


shquote_words(wordList, quotedChars, escapeString, sepString)



This page produced by UniDoc on 2021/04/15 @ 23:59:54.