[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to call a command from another one
From: |
Marco Gerards |
Subject: |
Re: How to call a command from another one |
Date: |
Tue, 12 Jun 2007 19:16:48 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
adrian15 <address@hidden> writes:
> Robert Millan escribió:
>> On Tue, Jun 12, 2007 at 01:57:11PM +0200, adrian15 wrote:
>>> Hi,
>>>
>>> I want to implement the pause command so that it is the same thing as
>>> the echo command with all of its options and also that it stops.
>> I don't know how to call other commands, but in this case, maybe
>> grub_printf()
>> will be good enough?
>
> I agree with you but...
>
> I think it would be a good idea to have a pause message that has the
> same options as the echo command because the echo command has some
> nice options and because I like to reuse code.
Make them share the same file. Call grub_cmd_echo with the same
arguments which are used for pause. Before and after that you can do
whatever you want. The disadvantage of this approach is that the set
of arguments should be the same.
--
Marco