All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Questions for writing manpages
Date: Wed, 30 Jan 2008 17:43:03 -0500	[thread overview]
Message-ID: <1201732983.8103.62.camel@dv> (raw)
In-Reply-To: <1201731230.15073.45.camel@solid.paris.klabs.be>


On Wed, 2008-01-30 at 23:13 +0100, Franklin PIAT wrote:
> Hello,
> 
> I have some questions for the writing the documentation[1].
> 
> ** How to use "If [ $x=foo ] Then Else fi" statement ? 
> 
> I've successfully used :
>  if [ A=B ] ; then echo "foo" ; else echo "bar" ; fi" 
> 
> But I cannot use variables, with either :
>  if [ $i=B ] ; then echo "foo" ; else echo "bar" ; fi" 
>  if [ X$i=XB ] ; then echo "foo" ; else echo "bar" ; fi" 

If we don't care about UNIX from the seventies, this should work fine:

if [ "$x" = "$y" ]; then echo "foo"; else echo "bar"; fi

I guess you don't assign the variables correctly.  Please make sure you
don't use spaces around "=" in assignments, but use them in comparisons.

You can replace echo "foo" with echo "foo$i." to see the value of $i in
the same expression.

> ** How would you define the "rescue" mode ? In what situation 
> can it be useful to the user ?

I think the idea was to move most interactivity to a separate module
called normal.  If that module is not available, the internal "rescue"
mode is used to make it possible to load modules.  I don't know how
practical it is.

> ** Does the "ofconsole" console supports unicode ?

No.

-- 
Regards,
Pavel Roskin



  parent reply	other threads:[~2008-01-30 22:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-30 22:13 Questions for writing manpages Franklin PIAT
2008-01-30 22:29 ` Robert Millan
2008-01-30 23:45   ` Franklin PIAT
2008-01-31 10:49     ` Robert Millan
2008-01-31 20:54     ` Pavel Roskin
2008-01-31 21:28       ` Vesa Jääskeläinen
2008-01-31 21:32         ` Pavel Roskin
2008-01-30 22:43 ` Pavel Roskin [this message]
2008-01-31 10:51   ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1201732983.8103.62.camel@dv \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.