texinfo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 6.0 release


From: arnold
Subject: Re: 6.0 release
Date: Sun, 10 May 2015 09:10:33 -0600
User-agent: Heirloom mailx 12.4 7/29/08

> I didn't mean an awk misfeature, I meant a misfeature of the script.

Oops. Sorry. OK.

> > It does not. The string value of the variable contains a tab.
>
> No, it contains 2 characters: a backslash followed by 't'.  This isn;t
> a Posix shell we are talking about, so the "\t" part was passed to the
> script verbatim.

Right. And gawk processes arguments to -v for escape sequences, so that
by the time the rest of the script sees it, it has a tab in it.

(POSIX shells don't expand escape sequences inside double quotes.)

> > But the %s outputs the value of the variable without interpreting it.
>
> It probably passes it to libc's printf, no?

No. libc printf is only used for formatting floating point numbers.
Everything else gawk does itself, manually. And libc printf %s
does NOT interpret escape sequences, either. :-)

> In a nutshell, Invocation_name is a literal string, so IMO it should
> be displayed as such.

But it isn't quite; gawk interprets the escape sequences in it, when
-v is processed.

> The Windows shell features that take file names apart produce
> backslashes, not forward slashes.  So the batch file I wrote cannot
> use forward slashes.

Ah. Can you turn \ into \\ ?

> If this is a nuisance with no good solution, I can remove leading
> directories from Invocation_name.  I just thought that we don't want
> this behavior on any platform.  E.g., what if a directory name
> includes some other special characters?

Sounds like it needs to be handled in the shell script.

Thanks,

Arnold



reply via email to

[Prev in Thread] Current Thread [Next in Thread]