[Top][All Lists]

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

Re: Questions for writing manpages

From: Pavel Roskin
Subject: Re: Questions for writing manpages
Date: Wed, 30 Jan 2008 17:43:03 -0500

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 ?


Pavel Roskin

reply via email to

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