Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JKMcY-0002MH-6a for mharc-grub-devel@gnu.org; Wed, 30 Jan 2008 18:45:34 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JKMcW-0002L1-Sp for grub-devel@gnu.org; Wed, 30 Jan 2008 18:45:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JKMcU-0002HT-Ax for grub-devel@gnu.org; Wed, 30 Jan 2008 18:45:31 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JKMcU-0002HL-7c for grub-devel@gnu.org; Wed, 30 Jan 2008 18:45:30 -0500 Received: from smtp8-g19.free.fr ([212.27.42.65]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JKMcT-000293-MI for grub-devel@gnu.org; Wed, 30 Jan 2008 18:45:30 -0500 Received: from smtp8-g19.free.fr (localhost [127.0.0.1]) by smtp8-g19.free.fr (Postfix) with ESMTP id 1577817F51D for ; Thu, 31 Jan 2008 00:45:29 +0100 (CET) Received: from [192.168.0.20] (klabs.be [82.224.65.140]) by smtp8-g19.free.fr (Postfix) with ESMTP id 0B6C617F52C for ; Thu, 31 Jan 2008 00:45:26 +0100 (CET) From: Franklin PIAT To: The development of GRUB 2 In-Reply-To: <20080130222921.GC7679@thorin> References: <1201731230.15073.45.camel@solid.paris.klabs.be> <20080130222921.GC7679@thorin> Content-Type: text/plain Date: Thu, 31 Jan 2008 00:45:25 +0100 Message-Id: <1201736725.15073.70.camel@solid.paris.klabs.be> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: Questions for writing manpages X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2008 23:45:33 -0000 On Wed, 2008-01-30 at 23:29 +0100, Robert Millan wrote: > On Wed, Jan 30, 2008 at 11:13:50PM +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" > > Did you try ${i} and $(i)? (just guessing). It seems that variable expansion adds a space before and after the variable's value. Since the test must be "A=B", without space, results seems to be wrong (unless i'm doing something wrong). if [ A=A ]; then echo "foo" ; fi foo if [ A=B ]; then echo "foo" ; else echo "bar"; fi bar error: false ## WRONG if [ A = A ]; then echo "foo" ; fi foo if [ A = B ]; then echo "foo" ; fi foo ## WRONG if [ "A" = "A" ]; then echo "foo" ; fi foo if [ "A" = "B" ]; then echo "foo" ; fi foo ## WRONG if [ "A" == "A" ]; then echo "foo" ; fi foo if [ "A" == "B" ]; then echo "foo" ; fi foo ## WRONG if [ A = A ]; then echo "foo" ; fi foo if [ A = B ]; then echo "foo" ; fi foo ## WRONG if [ A==A ]; then echo "foo" ; fi error: false if [ A==B ]; then echo "foo" ; fi error: false #### WITH VARIABLES ###### set X=A echo $X A echo $(X) echo ${X} A ## WRONG if [ $X=A ]; then echo "foo" ; fi foo if [ $X=B ]; then echo "foo" ; fi foo if [ ${X}=A ]; then echo "foo" ; fi foo if [ ${X}=B ]; then echo "foo" ; fi foo ## Variables echo ${X}=A A =A echo A=${X} A= A echo A=$X A= A echo "A=$X" A= A > > ** How would you define the "rescue" mode ? In what situation > > can it be useful to the user ? > > Only when something breaks. For example, when GRUB can't load normal.mod > (and its associated modules), it dumps you to rescue mode. I'll try to simulate that. > > ** Does the "ofconsole" console supports unicode ? > No. Doc updated, thanks. Franklin