Signal capture trap and its usage in shell

kll -l command to view all signals

signal capture trap and its usage in the shell

Some of the most commonly used signal values ​​are as follows

Signal capture trap and its usage in the shell

The usage of tarp (note that single quotes are used)

Signal capture trap and its usage in the shell

For example

#! /bin/bash
trap'echo "good"' 2 Here you can use numeric numbers, signal names or abbreviations
sleep 100

When the above script is running, if We a

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5556 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.