All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Rydberg <jrydberg@night.trouble.net>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Scripting (IMPORTANT!)
Date: Thu, 05 Oct 2006 16:19:31 +0200	[thread overview]
Message-ID: <87fye29764.fsf@night.trouble.net> (raw)
In-Reply-To: <87fye2swwa.fsf@xs4all.nl> (Marco Gerards's message of "Thu, 05 Oct 2006 15:41:09 +0200")

[-- Attachment #1: Type: text/plain, Size: 844 bytes --]

Marco Gerards <mgerards@xs4all.nl> 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 #2: Type: application/pgp-signature, Size: 190 bytes --]

  reply	other threads:[~2006-10-05 13:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05 13:41 Scripting (IMPORTANT!) Marco Gerards
2006-10-05 14:19 ` Johan Rydberg [this message]
2006-10-05 14:36 ` Johan Rydberg
2006-10-09 12:52 ` tgingold
2006-10-13  2:48 ` Hollis Blanchard
2006-10-13  9:48   ` Marco Gerards
2006-10-13 19:32 ` Yoshinori K. Okuji
2006-10-13 19:52   ` Marco Gerards
2006-10-13 20:13     ` Yoshinori K. Okuji
2006-10-13 21:03       ` Marco Gerards
2006-10-14 15:29         ` Yoshinori K. Okuji
2006-10-14 15:43           ` Marco Gerards
2006-10-14 15:45             ` Yoshinori K. Okuji
     [not found] <200610051534.k95FYart014206@dell01.dinaserver.com>
2006-10-06  7:50 ` adrian15
2006-10-06 14:28   ` Marco Gerards

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=87fye29764.fsf@night.trouble.net \
    --to=jrydberg@night.trouble.net \
    --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.