Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

trap

How to stop the loop bash script in terminal?

August 9, 2022 by Magenaut

For example,

Categories Q&A, Unix & Linux Tags bash, signals, trap Leave a comment

“trap … INT TERM EXIT” really necessary?

August 9, 2022 by Magenaut

Many examples for trap use trap ... INT TERM EXIT for cleanup tasks. But is it really necessary to list all the three sigspecs?

Categories Q&A, Unix & Linux Tags bash, shell, signals, trap Leave a comment

Prevent SIGINT from interrupting function call and child process(es) within

August 9, 2022 by Magenaut

Consider the following script:

Categories Q&A, Unix & Linux Tags shell-script, signals, trap Leave a comment

Trap, ERR, and echoing the error line

August 9, 2022 by Magenaut

I’m trying to create some error reporting using a Trap to call a function on all errors:

Categories Q&A, Unix & Linux Tags bash, error-handling, shell-script, trap Leave a comment

What is signal 0 in a trap command?

August 8, 2022 by Magenaut

I’m following this guide on how to set up passwordless SSH authentication with ssh-agent.

Categories Q&A, Unix & Linux Tags bash, signals, trap Leave a comment

Bash: issuing trap twice

August 8, 2022 by Magenaut

If I issue the trap builtin twice [for the same signal], what happens? Is the second command added to the first, or does it replace the first?

Categories Q&A, Unix & Linux Tags bash, shell, trap Leave a comment

Silently start task in background

August 7, 2022 by Magenaut

I know that you can use this to start a process in the background, without getting the notification when the process is put in the background and when it is done like so:

Categories Q&A, Unix & Linux Tags process, trap, zsh Leave a comment

How to trigger error using Trap command

August 7, 2022 by Magenaut

I am using Ubuntu 12.04.2. I am trying to use “trap” command to capture abnormal or error in my shell script but I am also trying to manually trigger “Error” exit.

Categories Q&A, Unix & Linux Tags bash, error-handling, shell, trap Leave a comment
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress