Outils pour utilisateurs

Outils du site


tech:script_bash_fonctions_envrac

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:script_bash_fonctions_envrac [2026/09/08 14:36] – Jean-Baptistetech:script_bash_fonctions_envrac [2026/09/23 09:41] (Version actuelle) – Jean-Baptiste
Ligne 488: Ligne 488:
  
  
-Note : [[https://fr.wikipedia.org/wiki/NOP|NOP]] en bash :+Note : [NOP](https://fr.wikipedia.org/wiki/NOP) en bash :
 ~~~bash ~~~bash
 true true
Ligne 557: Ligne 557:
 ~~~ ~~~
  
------------ 
  
-~~~bash +Negate error code. Reverse false true posix command exit code
-#!/bin/bash +
-SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"+
  
-${SCRIPT_PATH}/sds_run.sh portal +Voir aussi : 
-~~~ +* /usr/lib/nagios/plugins/negate
- +
------+
  
 ~~~bash ~~~bash
Ligne 596: Ligne 591:
 ~~~ ~~~
  
-Voir aussi : +Negate pipe exit code 
-* PIPESTATUS + 
-* pipefail+Voir : 
 +* https://www.baeldung.com/linux/exit-status-piped-processes 
 + 
 +~~~ 
 +$ ls -l /tmp/toto | tee out.txt ; test ${PIPESTATUS[0]} -ne 0 
 +ls: cannot access '/tmp/toto': No such file or directory 
 +$ echo $? 
 +0 
 + 
 +$ ls -l /etc >/dev/null | tee out.txt ; test ${PIPESTATUS[0]} -ne 0 
 +$ echo $? 
 +1 
 +~~~ 
 + 
 + 
 +## Autres 
 + 
 +~~~bash 
 +#!/bin/bash 
 +SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 
 + 
 +${SCRIPT_PATH}/sds_run.sh portal 
 +~~~
  
  
tech/script_bash_fonctions_envrac.1788870974.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki