Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do ksh88 and ksh93 allow unclosed backticks?

Tags:

shell

unix

ksh

I have a question.

I don't get it why when I type:

echo "`date -d 20121231 +"%B

It executes without errors:

December

Why it executes successfully when the opening

`

is not closed at the end? It works on both Korn Shell 88 and 93.

like image 507
CuriousGuy Avatar asked Dec 02 '14 14:12

CuriousGuy


1 Answers

This was (if intentional) a decision made by David Korn.

There is no requirement for this behavior made by external forces -- no backwards compatibility requirement; no standards compliance reason (for that matter, POSIX sh was not yet standardized when ksh88 came out).

The only person who can give a definitive answer for the rationale -- if any -- behind unspecified behavior (behavior neither implementing not breaking any documented semantics) is the author of these shells.

like image 119
Charles Duffy Avatar answered Oct 13 '22 10:10

Charles Duffy