The Bash Trap Command

Posted by bob on Aug 7, 2019 12:41 PM EDT
Linux Journal; By Mitch Frazier
Mail this story
Print this story

If you've written any amount of bash code, you've likely come across the trap command. Trap allows you to catch signals and execute code when they occur. Signals are asynchronous notifications that are sent to your script when certain events occur. Most of these notifications are for events that you hope never happen, such as an invalid memory access or a bad system call. However, there are one or two events that you might reasonably want to deal with...

Full Story

  Nav
» Read more about: Story Type: News Story; Groups: Community, Linux

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.