Hamilton LaboratoriesHamilton C shell 2012User guideLanguage reference

Quoting

Oregon Coast

Quoting
Previous | Next

Topics

Usage
See also

Usage

String Meaning
' string '

Strong quote. Literal character string. Only escape characters and history substitutions are recognized. Embedded blanks, wildcard characters, double quotes, backquotes and dollar signs are treated as ordinary characters.

" string "

Weak quote. Embedded blanks, wildcard characters and single quotes are treated as ordinary characters. History, command and variable substitutions are still done.

` statement_list `

Command substitution. Evaluate the string as a separate command and substitute its output back onto the command line. Newlines are turned into spaces and ANSI escape sequences (for highlighting, etc.) are filtered out.

`` statement_list ``

Line-at-a-time command substitution. Whole lines of output from the enclosed statements are parsed as words, even if they have embedded spaces or other special characters. Very useful for dealing with Windows filenames that have spaces.

^c

Escape just the next character. Use to remove any special meaning from the next character, to specify a character by its binary value or to specify one following non-printable characters. If the NewLine character at the end of a line is quoted this way, it’s treated as ordinary white space.

The default escape character is the circumflex ^, Windows-style. You can set it to be \, Unix-style, or any other character of your choice by changing the escapesym variable.

Escape sequences
^a Audible alert (bell)
^b Backspace
^f Form Feed
^n New Line
^r Carriage Return
^t Tab
^v Vertical Tab
^^ Single escapesym character
^octal The binary character value as a 3-digit octal number.
^xhex The binary character value as a 2-digit hexadecimal number.

See also

escapesym variable
Wildcarding
Variable substitutions
History recall
Tutorial: Quoting
Tutorial: Wildcarding
Tutorial: Variables
Tutorial: History

Previous | Next

Getting started with Hamilton C shell

Hamilton C shell, as it first wakes up.

Getting started with Hamilton C shell

A first few commands.

You can set the screen colors to your taste.

You can set the screen colors to your taste.