The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem In Shell Script satyakide Shell Programming and Scripting 11 09-24-2007 10:00 AM
Help! Problem with Shell Script. pektl Shell Programming and Scripting 7 05-29-2006 05:08 AM
Problem with SU or SSH in shell script sravanp UNIX for Dummies Questions & Answers 2 01-24-2006 12:00 PM
Shell Script problem bnohifi Shell Programming and Scripting 1 07-07-2005 02:02 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-29-2005
zylwyz's Avatar
zylwyz zylwyz is offline
Registered User
  
 

Join Date: Jun 2005
Location: I'm living in Unix :)
Posts: 53
Unhappy SIGINT usage in shell scripts

How can I use SIGINT in my shell scripts?

Last edited by zylwyz; 06-29-2005 at 12:38 PM..
  #2 (permalink)  
Old 06-29-2005
jerardfjay jerardfjay is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 146
you should use "trap" command.

I am not sure of the syntax. However I have used it as follows in the beginning of the script to capture the Ctrl-C (Interrupt)

trap " " 2

When this is used all of the Interrrupt signals to the execution of the shell script are ignored.

Jerardfjay
  #3 (permalink)  
Old 06-29-2005
zylwyz's Avatar
zylwyz zylwyz is offline
Registered User
  
 

Join Date: Jun 2005
Location: I'm living in Unix :)
Posts: 53
Talking

Thanks, jerardfjay!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0