Questions tagged [shell-trap]

18 questions
0
votes
1 answer

Remove temporary files at end of bourne shell script

I've tried to use trap to remove a temporary file at the end of a Bourne shell script, but this doesn't work: trap "trap \"rm \\\"$out\\\"\" EXIT INT TERM" 0 This is inside a function, by the way, hence the attempt at a nested trap. How do I do it?
Robin Green
  • 32,079
  • 16
  • 104
  • 187
0
votes
2 answers

JBoss Init Script - Trapping issue

I have a script that I'm making to use to start/stop/etc a JBoss AS (v7.1.1). I'm running on SUSE Enterprise 11, so the provided initscript doesn't work. The problem I'm running into with my script is that the cleanup function is never…
Ethan Reesor
  • 2,090
  • 1
  • 23
  • 40
-1
votes
1 answer

shell script terminating program but not the script itself

I am using a shell script to automatically search network access points, and in airodump you use ctrl + c to stop the search, and I am wanting to it cancel the search but keep my shell script running. Since I am wanting to do user input after I am…
andyADD
  • 610
  • 1
  • 6
  • 20
1
2