Re: backslashes


Subject: Re: backslashes
From: Hollis R Blanchard (hollis+@andrew.cmu.edu)
Date: Wed Mar 07 2001 - 15:48:17 MST


On Wed, 7 Mar 2001, William K. Gibson wrote:
>
> boot hd:9,\\yaboot
>
> Don't ask me why you only need two slashes instead of 4 but that's the way
> it is.

\\ is the "real" command. In yaboot.conf (as well as many config files),
however, backslashes are escape characters. This is how \n prints a new line
instead of "\n".

So (ONLY in yaboot.conf) to print a "\", you need to escape it twice in the
config file: "\\". To get 2 backslashes (the real OF command) you need 4 in
the config file.

Maybe looking at it as translation is easier to understand:
_char_ _printed char_
\n newline
\t tab
\\ backslash

-Hollis



This archive was generated by hypermail 2a24 : Wed Mar 07 2001 - 15:48:20 MST