11-23-2012
You learn that one the hard way. :-)
These 2 Users Gave Thanks to achenle For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
Discussion started by: sars
4 Replies
2. Programming
Hi,
I have a main loop which calls a sub loop, which finally returns to the main loop itself. The main loop runs when a flag is set. Now, I have a signal handler for SIGINT, which resets the flag and thus stops the main loop. Suppose I send SIGINT while the program is in subloop, I get an error... (1 Reply)
Discussion started by: Theju
1 Replies
3. Programming
Hello,
i am using the sigaction function to handle the SIGCHLD signal.Is it possible to use a class member function as the handler function (the sa_handler member of the sigaction structure)?
The function's signature is:
void (*sa_handler)(int);so i don't think i can use a static member function... (2 Replies)
Discussion started by: Zipi
2 Replies
4. Shell Programming and Scripting
I have two scripts. script1.sh looks
--------------------------------
#!/bin/bash
display()
{
echo "Welcome to Unix"
}
display
-----------------------------
Script2.sh
#!/bin/bash
sh script1.sh //simply calling script1.sh
------------------------------ (1 Reply)
Discussion started by: mvictorvijayan
1 Replies
5. Shell Programming and Scripting
In my Bash script I have an exit/cleanup function in a trap statement like:
trap exitCleanup 1 2 3 6 15 25
Is there anyway to capture which signal # has occurred to record in a log file. Please note I am trying to avoid something like:
trap 'mySignal=1; exitCleanup' 1
trap... (1 Reply)
Discussion started by: ckmehta
1 Replies
6. Shell Programming and Scripting
This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord
but only one record is getting wrote in DB.... Please advise ASAP...:confused:
function InsertFtg
{
FTGSTR=""
echo "Saurabh is GREAT $#"
let... (2 Replies)
Discussion started by: omkar.sonawane
2 Replies
7. Shell Programming and Scripting
I have a script which does gunzip, zip and untar.
Input to the script is file name and file directory (where file is located)
I am reading the input parameters as follows:
FILENAME=$1
FILEDIR=$2
I have created 3 functions that are as follows:
1) gunzip file
2) unzip file... (2 Replies)
Discussion started by: pinnacle
2 Replies
8. Shell Programming and Scripting
Dear All.
I have a script, which process files one by one. In the script I have two functions.
one sftp files to different server
the other from existing file create file with different name.
My question is:
Will sftp function recognize files names , which are created in another... (1 Reply)
Discussion started by: digioleg54
1 Replies
9. Shell Programming and Scripting
Hi,
I am having script which contains many functions. Need to print each function name at the starting of the function. Like below,
functionname()
{
echo "functionname"
commands....
}
I've tried like below,
func=`grep "()" scriptname | cut -d "(" -f1`
for i in $func
do
nawk -v... (4 Replies)
Discussion started by: Sumanthsv
4 Replies
10. Shell Programming and Scripting
Hi All,
Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition.
#Body
function1()
{
if
then
echo "exist"
else
echo "not exist"
}
#if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies
LEARN ABOUT DEBIAN
signal
signal(3tcl) signal(3tcl)
NAME
signal - dynamically loadable signal handling for Tcl/Tk
SYNOPSIS
signal (add|delete|print|version) [options]
COMMANDS
add signo proc [-async]
Adds a signal handler for signal signo through proc proc. Signals can be provided by number, or the most common ones are provided by name
(e.g., SIGHUP). The proc is any Tcl procedure, and it is evaluated when the signal comes in. It will be provided no arguments.
Signal handlers have Posix semantics - they persist until reset.
If -async is used, the signal handler is created using Tcl_AsyncCreate(). Checks for the signal are very frequent (each evaluation) using
this technique, but one doesn't know quite where evaluation is or how to handle errors in this situation. The code will evaluate the pro-
vided procedure in the current interpreter if available, and in the interpreter which added the signal handler otherwise. At least until a
better scheme is suggested.
The -async is especially useful to interrupt "runaway" procs, or to cause a quick exit; the default mechanism simply waits for another
MainLoop cycle.
signal delete signo
Restores handling of signal signo to the default ( SIG_DFL ).
signal print
Prints the handling of all signals with handlers. Formatted as
signal ----> procedure or as
signal !---> procedure
if the signal is handled asynchronously
signal print signo
Prints the procedure for handling signal signo. Prints the word UNHANDLED if no signal handler is active for that signal.
signal version
Returns the string representing the current version of the package
AUTHOR
Michael Schwartz <mschwart@nyx.net>. Tilman Kranz <tilde@tk-sls.de> patched this for wider portability on Linux
Tcl Signal Extension 1.4.0.1 Tcl signal(3tcl)