Difference between revisions of "Bash buildin: trap"

From wikieduonline
Jump to navigation Jump to search
Line 4: Line 4:
 
  trap - INT
 
  trap - INT
 
  (no output)
 
  (no output)
 +
 +
 +
 +
err_report() {
 +
  echo "ERROR: existed with error on line $1"
 +
}
 +
 +
trap 'err_report [[$LINENO]]' ERR
  
  

Revision as of 10:49, 29 August 2022

Advertising: