nutools base: ajout de noerror(), noout(), noerr()
This commit is contained in:
parent
db76488e16
commit
66249c9d46
|
@ -2843,6 +2843,22 @@ function eerror_if() {
|
|||
fi
|
||||
}
|
||||
|
||||
function noerror() {
|
||||
# lancer la commande "$@" et masquer son code de retour
|
||||
[ $# -gt 0 ] || set :
|
||||
"$@" || return 0
|
||||
}
|
||||
function noout() {
|
||||
# lancer la commande "$@" en supprimant sa sortie standard
|
||||
[ $# -gt 0 ] || return 0
|
||||
"$@" >/dev/null
|
||||
}
|
||||
function noerr() {
|
||||
# lancer la commande "$@" en supprimant sa sortie d'erreur
|
||||
[ $# -gt 0 ] || return 0
|
||||
"$@" 2>/dev/null
|
||||
}
|
||||
|
||||
TAB=$'\t'
|
||||
LATIN1=iso-8859-1
|
||||
LATIN9=iso-8859-15
|
||||
|
|
Loading…
Reference in New Issue