SuperCard Shell Essentials

 

Quoting and Character Escapes

Page history last edited by DCS 3 yrs ago

Quoting and Character Escapes

 

The date format tokens in the following example, '+%a, %e %b %Y %T %Z', must appear to be a single unit (a word in shell speak) to the shell.

Without quotes or escapes, the space character between the format tokens will cause the command to fail.

 

The 5 date commands below are identical, but quoted/escaped differently.
on mouseup
put merge("date `+%a, %e %b %Y %T %Z` ; ") &¬
"date '+%a, %e %b %Y %T %Z' ; " &¬
"date +%a,' %e %b %Y %T '%Z ; " &¬
"date +%a,' '%e' '%b' '%Y' '%T' '%Z ; " &¬
"date +%a, %e %b %Y %T %Z ; " after cmd
--
alert Sheet shell(cmd)
end mouseup

 

Much more on quoting and escape sequences to come.

Comments (0)

You don't have permission to comment on this page.