bug-bash
[Top][All Lists]
Advanced

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

Re: Echoing commands


From: Robert Elz
Subject: Re: Echoing commands
Date: Fri, 14 Jun 2024 01:13:23 +0700

    Date:        Wed, 12 Jun 2024 19:31:13 +0200
    From:        Angelo Borsotti <angelo.borsotti@gmail.com>
    Message-ID:  
<CAB9Jk9AP+i2fGK_aF4PH6NZ3ohXujHaNximquBzHhte5agsEyQ@mail.gmail.com>

  | I would stress the importance of this: the purpose of scripts is
  | to execute commands,

Yes.

  | informing the caller of what they execute,

No.   If a script wants to provide output like that to the user
it should do it explicitly.   Then it has the ability to format
that output in a form that makes sense for the script in question.

But that kind of use should be rare - scripts should generally run
silently, exactly the same as any other command.   You wouldn't want "cat"
to say "now opening file xxxx" "reading a buffer from file ..." ...
"closing file xxx" or any other nonsense like that, would you?

The output from a command (whether it is a script, or anything else)
should be the desired result from what the command is designed to do.
No more, no less.   That means, often, nothing at all, if the command
is not intended to produce output, and no error occurs.

kre





reply via email to

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