grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] terminal split


From: Yoshinori K. Okuji
Subject: Re: [PATCH] terminal split
Date: Thu, 6 Nov 2008 18:20:57 +0100
User-agent: KMail/1.9.9

On Tuesday 04 November 2008 19:31:09 Vesa Jääskeläinen wrote:
> Yoshinori K. Okuji wrote:
> > BTW, I would like to obtain the capability of handling pipes, so that we
> > can, say, "help | more". I guess you have the same idea in your mind.
> > This should be trivial, once the input and output are separate, right?
>
> I think this would need separated streams design in order to be
> functional. Not a bad idea as such.... I am wondering the gain however.
> What kind of implementation plan did you have for piping in example more?

In "if" conditions, pipes can be sometimes very useful. For example:

  if ls | grep eth; then
    # if any ethernet device is present, change the strategy...
    set fallback="1 2"
  fi

Also, a similar technique can be used to implement "getting an output as a 
string". For example:

  # Use the same password as the super user.
  set password=$(sed -ne '/^root:/{s/root:\([^:]*\).*/\1/;p}' /etc/shadow)

Regards,
Okuji




reply via email to

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