The way to send Ctrl+C to a process is by running this command:
If you want the script to self detect when its stuck, you can spawn off another script in background (somewhere at the start of the main script) which will monitor the parent and based on some condition (which will define what is getting "stuck") will kill the parent.
You can also explore trap command - that provides signal handling facilities which you may find useful.
how to use the arrow keys in shell scripting. is there any special synatax / command for this.
i just want to use the arrow keys for navigation.
replies appreciated
raguram R (3 Replies)
I would like to get a script to respond to arrow key presses to scroll up and down a menu.
The platform is CDLinux which uses a prehistoric version of bash, version 1.14.7.
I would like to do something like "read -sn 1 keyin" but the "read" command is so primative that it only has the -r... (1 Reply)
hello everybody,
as many, I have a problem with a script...
I wrote a shell script in which I want to read a variable value. the problem is that I can't use the arrow keys.
Here is the script I use :
#!/bin/bash
stty erase ^H
read foune
echo "$foune"
exit 0;
the problem is... (2 Replies)
Hi, I'd like to make a script where I can send a directory OR files as an argument, and compress them. My proble mis, I do know how to send a directory, but I do not know what to do if there are more than 1 file, I mean I can store the directory in $1, but how do I store 4 files? must I write $1,... (3 Replies)
Hi Experts,
Need your help.
I am trying to send a command via ssh to about a hundred network devices. I intend to do this via a bash script something similar to the below:
ssh -l user testmachine.com "show version"
Obviously this will not work given the password prompt that comes... (2 Replies)
Is there a quick and dirty utility to send emails (does not need to be part of a package to receive and view email, in fact, I'd prefer if it wasn't).
Ideally I would like to be able to send attachments as well.
Mike
---------- Post updated at 04:29 PM ---------- Previous update was at... (9 Replies)
I have a sample script here I want to bold the word BOLD in the text and send through email. Tried several ways but not seems to working.
BODY="Hello. I want to BOLD this"
{
echo "From: from@gmail.com"
echo "To: to@gmail.com"
echo "Subject: Texting"
... (1 Reply)
Hi All,
Consider we have script Linux server . But we don't have permission to edit that file.
When run the script, it opens a file as "/tmp/xxx0000 .txt" with few contents. Most of the time the contents doesn't required to modify and they just save and close (:wq!).
So the script continues... (7 Replies)
Discussion started by: k_manimuthu
7 Replies
LEARN ABOUT OSX
sigdist.d
sigdist.d(1m) USER COMMANDS sigdist.d(1m)NAME
sigdist.d - signal distribution by process. Uses DTrace.
SYNOPSIS
sigdist.d
DESCRIPTION
This is a simple DTrace script that prints the number of signals recieved by process and signal number. This script is also available as
/usr/demo/dtrace/sig.d, where it originates.
Since this uses DTrace, only users with root privileges can run this command.
EXAMPLES
This samples until Ctrl-C is hit.
# sigdist.d
FIELDS
SENDER process name of sender
RECIPIENT
process name of target
SIG signal number, see signal(3head)
COUNT number of signals sent
BASED ON
/usr/demo/dtrace/sig.d
DOCUMENTATION
DTrace Guide "proc Provider" chapter (docs.sun.com)
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver-
bose descriptions explaining the output.
EXIT
sigdist.d will sample until Ctrl-C is hit.
SEE ALSO kill.d(1M), dtrace(1M)version 1.00 Jun 09, 2005 sigdist.d(1m)