helpThe GNU Bourne-Again SHell - Support: sr #108738, Add built-in err and warn commands


sr #108738: Add built-in err and warn commands

Submitted by:  None
Submitted on:  Sat 31 Jan 2015 03:17:17 PM UTC  
Category:  None Priority:  5 - Normal
Severity:  1 - Wish Status:  Wont Do
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 13 Nov 2015 10:23:13 PM UTC, comment #1:

I don't think there is enough reason to make these part of the shell itself, considering how trivial they are to implement as shell functions.

They are a good argument for shell function libraries.

Chet Ramey <chet>
Project Administrator
Sat 31 Jan 2015 03:17:17 PM UTC, original submission:

For a lifetime now, I have had to duplicate functions like those mentioned, whenever I am forced to create a stand-alone script. It would be ultra handy to have them incorporated into bash to save the effort in pasting in the same patterns each time I write a stand alone script. For other scripts, I import them from a standard library of functions, but I probably have a few hundred system scripts with the same 8 lines in them:

function warn() {
echo >&2 "${0##*/}: $*"

function err() {
warn "$@"
exit 1



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-13 chet StatusNone => Wont Do

    Back to the top

    Powered by Savane 3.3