10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello:
Am trying to understand why the method #2 works but method #1 does not.
For both methods, sending CTRL+C should kill both the Parent script & all of the spanwd background procs.
Method #1:
==========================
#!/bin/sh
ctrl_c()
{
echo "** Trapped CTRL-C"
... (3 Replies)
Discussion started by: gilgamesh
3 Replies
2. Shell Programming and Scripting
Hi Folks -
For some reason, my trap command is not working. It's placed just prior to a normal exit:
#:: ------------------------------------------------------------------------
#::-- Script Name: LCM_Backup.sh
#::
#::-- Description: This script leverages Utility.sh to perform LCM... (16 Replies)
Discussion started by: SIMMS7400
16 Replies
3. Linux
Hi All,
I have ran one command tail -f <filename> to view newly appended text to that file. When i was done i pressed ctrl+c command to stop it but to my suprise it didn't work. I then tried top command and pressed ctrl+c and it worked fine and command aborted.
I then just checked the tail... (0 Replies)
Discussion started by: tushar_shah06
0 Replies
4. Shell Programming and Scripting
say i have a statement like this in a script
tail -f /opt/blah/blha/user.log > final.log
if ;then
cat final.log | grep -i "servicer_user" > service.log
cat final.log | grep -i "logic_user" > logic.log
fi
echo "script completed"
but when the script is running if i press ctrl + c the... (4 Replies)
Discussion started by: vivek d r
4 Replies
5. Shell Programming and Scripting
Hello,
I have a script which copies via scp several large files to a remote server. What I want is that even if someone hits CTRL-C, the scp commands continues till the end.
Here is what I wrote
#! /bin/bash
function testFunction
{
echo "COPY START"
scp large.tar.gz... (11 Replies)
Discussion started by: RobertFord
11 Replies
6. Shell Programming and Scripting
I am trying to trap CTRL-C, now the program I call has it's own exit message, I think this is the problem ..
This is what I have now :
function dothis
{
echo 'you hit control-c'
exit
}
function settrap
{
trap dothis SIGINT
}
settrap
until false; do
./ITGRecv.exe
doneDoing this I... (2 Replies)
Discussion started by: Pmarcoen
2 Replies
7. Shell Programming and Scripting
I've search the various posts in these forums, but have not come up with a solution to my problem.
I have a parent process that calls a child script, runs it in the background and the parent finishes - without waiting for the child process to complete. Inside the child, a trap is issued to trap... (6 Replies)
Discussion started by: HobieCoop
6 Replies
8. UNIX for Dummies Questions & Answers
Hello at my home when i try
tail +5 emp
it works but when i try in my college it doesn't work! what can be the problem any idea?
when i type
man tail
it gives me various options in which it's mentioned that tail +n can also work when you want to display from nth line. But... (3 Replies)
Discussion started by: salman4u
3 Replies
9. UNIX for Advanced & Expert Users
how to trap the ctrl c in unix shell script
my script is running in while loop it should not be terminate with ctrl c.
if i press ctrl c while running script it shloud ignore the same.
please healp..........
thanks in advance (2 Replies)
Discussion started by: arvindng
2 Replies
10. AIX
I wrote a ksh script for Helpdesk. I need to know how to disable ctrl-c,ctrl-z,ctrl-d..... so that helpdesk would not be able to get to system prompt :confused: (6 Replies)
Discussion started by: wtofu
6 Replies