grub-devel
[Top][All Lists]
Advanced

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

Re: Scripting (IMPORTANT!)


From: Johan Rydberg
Subject: Re: Scripting (IMPORTANT!)
Date: Thu, 05 Oct 2006 16:19:31 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Marco Gerards <address@hidden> writes:

> Iterating over files:
> for x in (hd0,3)/foo/* ; do commands ; done

I must say I would prefer this over the other ("foreach") suggestion,
since I'm more used to it. 

Anyhow, is your plan to make expansion available through out the whole
shell, or only for "for"?  It would be nice to be able to do;

 grub> ls (*,*)/boot/vmlinuz*

> One special purpose variable $ERROR will be added.  It will contain
> the error strings when $? is set to non-zero.  In that case you can do
> error handling in scripts.

I'm afraid there might be situations where the user do not realize
that $ERROR has been overwritten.  Bogus example;

  if cat (hd0,1)/foo/bar; then 
    ls (hd0,1)/foo
    echo "*** 'bar' is missing: $ERROR"
  fi

The execution of 'ls' will overwrite $ERROR.

~j

Attachment: pgp9rU6OQmv85.pgp
Description: PGP signature


reply via email to

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